xprtrdma: Limit work done by completion handler
authorChuck Lever <chuck.lever@oracle.com>
Wed, 28 May 2014 14:33:51 +0000 (10:33 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 4 Jun 2014 12:56:45 +0000 (08:56 -0400)
commit8301a2c047cc25dabd645e5590c1db0ead4c5af4
treeeb9901cc1585570fe8306d05d6d3b381662ef1ce
parent1c00dd0776543608e13c74a527660cb8cd28a74f
xprtrdma: Limit work done by completion handler

Sagi Grimberg <sagig@dev.mellanox.co.il> points out that a steady
stream of CQ events could starve other work because of the boundless
loop pooling in rpcrdma_{send,recv}_poll().

Instead of a (potentially infinite) while loop, return after
collecting a budgeted number of completions.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Acked-by: Sagi Grimberg <sagig@dev.mellanox.co.il>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/verbs.c
net/sunrpc/xprtrdma/xprt_rdma.h