• Chuck Lever's avatar
    xprtrdma: Fix latency regression on NUMA NFS/RDMA clients · 6720a899
    Chuck Lever authored
    With v4.15, on one of my NFS/RDMA clients I measured a nearly
    doubling in the latency of small read and write system calls. There
    was no change in server round trip time. The extra latency appears
    in the whole RPC execution path.
    
    "git bisect" settled on commit ccede759 ("xprtrdma: Spread reply
    processing over more CPUs") .
    
    After some experimentation, I found that leaving the WQ bound and
    allowing the scheduler to pick the dispatch CPU seems to eliminate
    the long latencies, and it does not introduce any new regressions.
    
    The fix is implemented by reverting only the part of
    commit ccede759 ("xprtrdma: Spread reply processing over more
    CPUs") that dispatches RPC replies specifically on the CPU where the
    matching RPC call was made.
    
    Interestingly, saving the CPU number and later queuing reply
    processing there was effective _only_ for a NFS READ and WRITE
    request. On my NUMA client, in-kernel RPC reply processing for
    asynchronous RPCs was dispatched on the same CPU where the RPC call
    was made, as expected. However synchronous RPCs seem to get their
    reply dispatched on some other CPU than where the call was placed,
    every time.
    
    Fixes: ccede759 ("xprtrdma: Spread reply processing over ... ")
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Cc: stable@vger.kernel.org # v4.15+
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    6720a899
rpc_rdma.c 37.5 KB