• Chuck Lever's avatar
    xprtrdma: Allocate req's regbufs at xprt create time · bb93a1ae
    Chuck Lever authored
    Allocating an rpcrdma_req's regbufs at xprt create time enables
    a pair of micro-optimizations:
    
    First, if these regbufs are always there, we can eliminate two
    conditional branches from the hot xprt_rdma_allocate path.
    
    Second, by allocating a 1KB buffer, it places a lower bound on the
    size of these buffers, without adding yet another conditional
    branch. The lower bound reduces the number of hardway re-
    allocations. In fact, for some workloads it completely eliminates
    hardway allocations.
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    bb93a1ae
xprt_rdma.h 19.6 KB