]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xprtrdma: Remove completion polling budgets
authorChuck Lever <chuck.lever@oracle.com>
Thu, 23 Apr 2015 23:46:33 +0000 (19:46 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 31 Aug 2015 20:46:00 +0000 (14:46 -0600)
commit143fb1314a00738929cc8887ac10a519430a62c8
tree55ba9a05d186232488b368a03c65cf5261923640
parent8faf9659bd0708f44753c6386c500b5fa7c738b3
xprtrdma: Remove completion polling budgets

[ Proposed for upstream v4.4 ]

Commit 8301a2c047cc ("xprtrdma: Limit work done by completion
handler") was supposed to prevent xprtrdma's upcall handlers from
starving other softIRQ work by letting them return to the provider
before all CQEs have been polled.

The logic assumes the provider will call the upcall handler again
immediately if the CQ is re-armed while there are still queued CQEs.

This assumption is invalid. The IBTA spec says that after a CQ is
armed, the hardware must interrupt only when a new CQE is inserted.
xprtrdma can't rely on the provider calling again, even though some
providers do.

Therefore, leaving CQEs on queue makes sense only when there is
another mechanism that ensures all remaining CQEs are consumed in a
timely fashion. xprtrdma does not have such a mechanism. If a CQE
remains queued, the transport can wait forever to send the next RPC.

Finally, move the wcs array back onto the stack to ensure that the
poll array is always local to the CPU where the completion upcall is
running.

Fixes: 8301a2c047cc ("xprtrdma: Limit work done by completion ...")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/xprtrdma/verbs.c
net/sunrpc/xprtrdma/xprt_rdma.h