]> git.baikalelectronics.ru Git - kernel.git/commit
xprtrdma: Allocate req's regbufs at xprt create time
authorChuck Lever <chuck.lever@oracle.com>
Wed, 24 Apr 2019 13:39:21 +0000 (09:39 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 25 Apr 2019 19:02:11 +0000 (15:02 -0400)
commit1e349d78e5b6c8d8b0ffaf7a558eb83b962f37f5
treeba6a0e77478d176d88ca30bd228ed64598733d94
parent4b464a2eca62c4f80f6ce3ec3ed6c7b575ddf9c7
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>
net/sunrpc/xprtrdma/backchannel.c
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtrdma/verbs.c
net/sunrpc/xprtrdma/xprt_rdma.h