• Chuck Lever's avatar
    xprtrdma: Wait on empty sendctx queue · 2fad6592
    Chuck Lever authored
    Currently, when the sendctx queue is exhausted during marshaling, the
    RPC/RDMA transport places the RPC task on the delayq, which forces a
    wait for HZ >> 2 before the marshal and send is retried.
    
    With this change, the transport now places such an RPC task on the
    pending queue, and wakes it just as soon as more sendctxs become
    available. This typically takes less than a millisecond, and the
    write_space waking mechanism is less deadlock-prone.
    
    Moreover, the waiting RPC task is holding the transport's write
    lock, which blocks the transport from sending RPCs. Therefore faster
    recovery from sendctx queue exhaustion is desirable.
    
    Cf. commit 5804891455d5 ("xprtrdma: ->send_request returns -EAGAIN
    when there are no free MRs").
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    2fad6592
verbs.c 38.7 KB