]> git.karo-electronics.de Git - mv-sheeva.git/commit
RDS: Use a generation counter to avoid rds_send_xmit loop
authorChris Mason <chris.mason@oracle.com>
Thu, 15 Apr 2010 20:38:14 +0000 (16:38 -0400)
committerAndy Grover <andy.grover@oracle.com>
Thu, 9 Sep 2010 01:12:24 +0000 (18:12 -0700)
commit9e29db0e3645cafa980e68a9c717a761448389e1
tree4ce87432acbda8e16c27c97f3d1ae5339bb53559
parentacfcd4d4ec4ed8cb504f96d4fabb7a94029b362b
RDS: Use a generation counter to avoid rds_send_xmit loop

rds_send_xmit is required to loop around after it releases the lock
because someone else could done a trylock, found someone working on the
list and backed off.

But, once we drop our lock, it is possible that someone else does come
in and make progress on the list.  We should detect this and not loop
around if another process is actually working on the list.

This patch adds a generation counter that is bumped every time we
get the lock and do some send work.  If the retry notices someone else
has bumped the generation counter, it does not need to loop around and
continue working.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Andy Grover <andy.grover@oracle.com>
net/rds/connection.c
net/rds/rds.h
net/rds/send.c