[PATCH] disable Nagle's algorithm for RPC over TCP sockets

From: Chuck Lever (cel@citi.umich.edu)
Date: Wed Oct 02 2002 - 14:55:21 EST


hi Linus-

please apply this patch to 2.5.40. it disables Nagle's algorithm for TCP
sockets used by the RPC client. other RPC implementations on TCP also
disable Nagle. this reduces average RPC request latency on TCP, and makes
network trace tools work a little nicer.

trond, alexey, and davem are all OK with this patch.

diff -drN -U2 01-iip/net/sunrpc/xprt.c 02-nagle/net/sunrpc/xprt.c
--- 01-iip/net/sunrpc/xprt.c Fri Sep 27 17:50:23 2002
+++ 02-nagle/net/sunrpc/xprt.c Tue Oct 1 10:59:06 2002
@@ -1447,4 +1447,6 @@
                 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;

-- 

corporate: <cel at netapp dot com> personal: <chucklever at bigfoot dot com>

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 22:00:35 EST