• Chuck Lever's avatar
    SUNRPC: Optimize page release in svc_rdma_sendto() · 5581cf8e
    Chuck Lever authored
    
    
    Now that we have bulk page allocation and release APIs, it's more
    efficient to use those than it is for nfsd threads to wait for send
    completions. Previous patches have eliminated the calls to
    wait_for_completion() and complete(), in order to avoid scheduler
    overhead.
    
    Now release pages-under-I/O in the send completion handler using
    the efficient bulk release API.
    
    I've measured a 7% reduction in cumulative CPU utilization in
    svc_rdma_sendto(), svc_rdma_wc_send(), and svc_xprt_release(). In
    particular, using release_pages() instead of complete() cuts the
    time per svc_rdma_wc_send() call by two-thirds. This helps improve
    scalability because svc_rdma_wc_send() is single-threaded per
    connection.
    Reviewed-by: default avatarTom Talpey <tom@talpey.com>
    Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    5581cf8e
svc_rdma_sendto.c 30.4 KB