xprtrdma: Allocate req's regbufs at xprt create time
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:Chuck Lever <chuck.lever@oracle.com> Signed-off-by:
Anna Schumaker <Anna.Schumaker@Netapp.com>
Showing
- net/sunrpc/xprtrdma/backchannel.c 4 additions, 14 deletionsnet/sunrpc/xprtrdma/backchannel.c
- net/sunrpc/xprtrdma/transport.c 2 additions, 2 deletionsnet/sunrpc/xprtrdma/transport.c
- net/sunrpc/xprtrdma/verbs.c 26 additions, 8 deletionsnet/sunrpc/xprtrdma/verbs.c
- net/sunrpc/xprtrdma/xprt_rdma.h 1 addition, 1 deletionnet/sunrpc/xprtrdma/xprt_rdma.h
Loading
Please register or sign in to comment