WSL2-Linux-Kernel/net/sunrpc/xprtrdma
Chuck Lever 48be539dd4 xprtrdma: Introduce ->alloc_slot call-out for xprtrdma
rpcrdma_buffer_get acquires an rpcrdma_req and rep for each RPC.
Currently this is done in the call_allocate action, and sometimes it
can fail if there are many outstanding RPCs.

When call_allocate fails, the RPC task is put on the delayq. It is
awoken a few milliseconds later, but there's no guarantee it will
get a buffer at that time. The RPC task can be repeatedly put back
to sleep or even starved.

The call_allocate action should rarely fail. The delayq mechanism is
not meant to deal with transport congestion.

In the current sunrpc stack, there is a friendlier way to deal with
this situation. These objects are actually tantamount to an RPC
slot (rpc_rqst) and there is a separate FSM action, distinct from
call_allocate, for allocating slot resources. This is the
call_reserve action.

When allocation fails during this action, the RPC is placed on the
transport's backlog queue. The backlog mechanism provides a stronger
guarantee that when the RPC is awoken, a buffer will be available
for it; and backlogged RPCs are awoken one-at-a-time.

To make slot resource allocation occur in the call_reserve action,
create special ->alloc_slot and ->free_slot call-outs for xprtrdma.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2018-05-07 09:20:03 -04:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
backchannel.c xprtrdma: Move creation of rl_rdmabuf to rpcrdma_create_req 2018-04-10 16:06:22 -04:00
fmr_ops.c xprtrdma: Fix max_send_wr computation 2018-05-07 09:20:03 -04:00
frwr_ops.c xprtrdma: Fix max_send_wr computation 2018-05-07 09:20:03 -04:00
module.c xprtrdma: Add proper SPDX tags for NetApp-contributed source 2018-05-07 09:20:03 -04:00
rpc_rdma.c xprtrdma: Add proper SPDX tags for NetApp-contributed source 2018-05-07 09:20:03 -04:00
svc_rdma.c svcrdma: Consult max_qp_init_rd_atom when accepting connections 2018-03-20 17:32:13 -04:00
svc_rdma_backchannel.c SUNRPC: Add a ->free_slot transport callout 2018-05-07 09:20:03 -04:00
svc_rdma_recvfrom.c svcrdma: Clean up rdma_build_arg_xdr 2018-03-20 17:32:13 -04:00
svc_rdma_rw.c svcrdma: Fix Read chunk round-up 2018-02-08 13:40:17 -05:00
svc_rdma_sendto.c svcrdma: Post Receives in the Receive completion handler 2018-01-18 11:52:51 -05:00
svc_rdma_transport.c sunrpc: Save remote presentation address in svc_xprt for trace events 2018-04-03 15:08:11 -04:00
transport.c xprtrdma: Introduce ->alloc_slot call-out for xprtrdma 2018-05-07 09:20:03 -04:00
verbs.c xprtrdma: Fix max_send_wr computation 2018-05-07 09:20:03 -04:00
xprt_rdma.h xprtrdma: Add proper SPDX tags for NetApp-contributed source 2018-05-07 09:20:03 -04:00