Skip to contentSkip to conversation

kNFSd - 2 of 4 - SVC sockets don't disable Nagle

PATCH New NeilBrown 1 participant 1 message Jun 18, 2003

Subsystems (3)
lore
Share & tools
lore

NeilBrown

author
#0 lore raw

PATCH 1/1 kNFSd - 2 of 4 - SVC sockets don't disable Nagle

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.

net/sunrpc/svcsock.c renamed from net/sunrpc/svcsock.c~current~ +3 -0
diff ./net/sunrpc/svcsock.c~current~ ./net/sunrpc/svcsock.c
@@ -936,6 +936,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;
@@ -952,6 +953,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

-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs