Linux NFS development
 help / color / mirror / Atom feed
* [PATCH] SVC sockets don't disable Nagle
@ 2003-04-29 22:03 Olof Johansson
  2003-04-29 22:42 ` Bogdan Costescu
  0 siblings, 1 reply; 6+ messages in thread
From: Olof Johansson @ 2003-04-29 22:03 UTC (permalink / raw)
  To: trond.myklebust, nfs

I noticed that the Nagle algorithm was disabled just recently on the 
client side, while it still seems to be enabled on the server side. The 
previous patch came from Chuck Lever.

Below patch disables it on the server side as well. For latency reasons, 
this should be the desired behaviour NFS at both client and server.

Diff is against 2.4.21-rc1.

---------------------------

--- linux-2.4.21-rc1/net/sunrpc/svcsock.c.orig
+++ linux-2.4.21-rc1/net/sunrpc/svcsock.c
@@ -932,6 +932,7 @@ static int
  svc_tcp_init(struct svc_sock *svsk)
  {
         struct sock     *sk = svsk->sk_sk;
+       struct tcp_opt  *tp = &(sk->tp_pinfo.af_tcp);

         svsk->sk_recvfrom = svc_tcp_recvfrom;
         svsk->sk_sendto = svc_tcp_sendto;
@@ -948,6 +949,8 @@ svc_tcp_init(struct svc_sock *svsk)
                 svsk->sk_reclen = 0;
                 svsk->sk_tcplen = 0;

+               tp->nonagle = 1;        /* disable Nagle's algorithm */
+
                 /* initialise setting must have enough space to
                  * receive and respond to one request.
                  * svc_tcp_recvfrom will re-adjust if necessary


---------------------------


Thanks,

Olof

-- 
Olof Johansson                                        Office: 4E002/905
pSeries Linux Development                             IBM Systems Group
Email: olof@austin.ibm.com                          Phone: 512-838-9858
All opinions are my own and not those of IBM.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-04-30 14:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-29 22:03 [PATCH] SVC sockets don't disable Nagle Olof Johansson
2003-04-29 22:42 ` Bogdan Costescu
2003-04-30  0:07   ` Olof Johansson
2003-04-30 12:06     ` Bogdan Costescu
2003-04-30 12:45       ` Trond Myklebust
2003-04-30 14:58       ` Olof Johansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox