Commit 0e32be1d authored by Trond Myklebust's avatar Trond Myklebust

[PATCH] Disable Nagle algorithm for RPC over TCP.

The Nagle algorithm gets in the way when sending short RPC messages to
the server. The following patch from Chuck does the equivalent of
setting TCP_NODELAY on the socket.
parent 78dfaef8
......@@ -1446,6 +1446,8 @@ xprt_bind_socket(struct rpc_xprt *xprt, struct socket *sock)
sk->no_check = UDP_CSUM_NORCV;
xprt_set_connected(xprt);
} else {
struct tcp_opt *tp = tcp_sk(sk);
tp->nonagle = 1; /* disable Nagle's algorithm */
sk->data_ready = tcp_data_ready;
sk->state_change = tcp_state_change;
xprt_clear_connected(xprt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment