mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
SUNRPC: Avoid holding locks across the XDR encoding of the RPC message
Currently, we grab the socket bit lock before we allow the message to be XDR encoded. That significantly slows down the transmission rate, since we serialise on a potentially blocking operation. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
7ebbbc6e7b
commit
3a03818fbe
1 changed files with 3 additions and 3 deletions
|
@ -1949,9 +1949,6 @@ call_transmit(struct rpc_task *task)
|
|||
task->tk_action = call_status;
|
||||
if (task->tk_status < 0)
|
||||
return;
|
||||
if (!xprt_prepare_transmit(task))
|
||||
return;
|
||||
task->tk_action = call_transmit_status;
|
||||
/* Encode here so that rpcsec_gss can use correct sequence number. */
|
||||
if (rpc_task_need_encode(task)) {
|
||||
rpc_xdr_encode(task);
|
||||
|
@ -1965,6 +1962,9 @@ call_transmit(struct rpc_task *task)
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (!xprt_prepare_transmit(task))
|
||||
return;
|
||||
task->tk_action = call_transmit_status;
|
||||
xprt_transmit(task);
|
||||
if (task->tk_status < 0)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue