SUNRPC: Move xpt_mutex into socket xpo_sendto methods
It appears that the RPC/RDMA transport does not need serialization of calls to its xpo_sendto method. Move the mutex into the socket methods that still need that serialization. Tail latencies are unambiguously better with this patch applied. fio randrw 8KB 70/30 on NFSv3, smaller numbers are better: clat percentiles (usec): With xpt_mutex: r | 99.99th=[ 8848] w | 99.99th=[ 9634] Without xpt_mutex: r | 99.99th=[ 8586] w | 99.99th=[ 8979] Serializing the construction of RPC/RDMA transport headers is not really necessary at this point, because the Linux NFS server implementation never changes its credit grant on a connection. If that should change, then svc_rdma_sendto will need to serialize access to the transport's credit grant fields. Reported-by: kbuild test robot <lkp@intel.com> [ cel: fix uninitialized variable warning ] Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
@@ -2548,8 +2548,16 @@ static int bc_sendto(struct rpc_rqst *req)
|
||||
return sent;
|
||||
}
|
||||
|
||||
/*
|
||||
* The send routine. Borrows from svc_send
|
||||
/**
|
||||
* bc_send_request - Send a backchannel Call on a TCP socket
|
||||
* @req: rpc_rqst containing Call message to be sent
|
||||
*
|
||||
* xpt_mutex ensures @rqstp's whole message is written to the socket
|
||||
* without interruption.
|
||||
*
|
||||
* Return values:
|
||||
* %0 if the message was sent successfully
|
||||
* %ENOTCONN if the message was not sent
|
||||
*/
|
||||
static int bc_send_request(struct rpc_rqst *req)
|
||||
{
|
||||
|
Reference in New Issue
Block a user