[v2,3/3] SUNRPC: Micro-optimisation to avoid call_bind+call_commit
diff mbox series

Message ID 20190305151722.45732-3-trond.myklebust@hammerspace.com
State New
Headers show
Series
  • [v2,1/3] SUNRPC: Prevent thundering herd when the socket is not connected
Related show

Commit Message

Trond Myklebust March 5, 2019, 3:17 p.m. UTC
Most tasks should not have to deal with disconnected or unbound
socket states, so let's move them out of the common state machine
path.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
 net/sunrpc/clnt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chuck Lever March 5, 2019, 4:07 p.m. UTC | #1
> On Mar 5, 2019, at 10:17 AM, Trond Myklebust <trondmy@gmail.com> wrote:
> 
> Most tasks should not have to deal with disconnected or unbound
> socket states, so let's move them out of the common state machine
> path.

Seems like a sensible idea. Were you able to measure any latency
improvement?


> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
> ---
> net/sunrpc/clnt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
> index c154684a35d4..b9251fd696ee 100644
> --- a/net/sunrpc/clnt.c
> +++ b/net/sunrpc/clnt.c
> @@ -1806,7 +1806,7 @@ call_encode(struct rpc_task *task)
> 		xprt_request_enqueue_receive(task);
> 	xprt_request_enqueue_transmit(task);
> out:
> -	task->tk_action = call_bind;
> +	task->tk_action = call_transmit;
> }
> 
> /*
> -- 
> 2.20.1
> 

--
Chuck Lever

Patch
diff mbox series

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index c154684a35d4..b9251fd696ee 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1806,7 +1806,7 @@  call_encode(struct rpc_task *task)
 		xprt_request_enqueue_receive(task);
 	xprt_request_enqueue_transmit(task);
 out:
-	task->tk_action = call_bind;
+	task->tk_action = call_transmit;
 }
 
 /*