xprtrdma: Don't provide a reply chunk when expecting a short reply
authorChuck Lever <chuck.lever@oracle.com>
Mon, 3 Aug 2015 17:04:08 +0000 (13:04 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 5 Aug 2015 20:21:27 +0000 (16:21 -0400)
commit33943b2974734ca5e5bef583d09ddd1eded6a77b
tree4804d4d7db18d2e746bde066691c47981ecd1d0a
parent02eb57d8f44caa582e297f51f3555d47767c5fe9
xprtrdma: Don't provide a reply chunk when expecting a short reply

Currently Linux always offers a reply chunk, even when the reply
can be sent inline (ie. is smaller than 1KB).

On the client, registering a memory region can be expensive. A
server may choose not to use the reply chunk, wasting the cost of
the registration.

This is a change only for RPC replies smaller than 1KB which the
server constructs in the RPC reply send buffer. Because the elements
of the reply must be XDR encoded, a copy-free data transfer has no
benefit in this case.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Tested-by: Devesh Sharma <devesh.sharma@avagotech.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/rpc_rdma.c