Module Name: src Committed By: tls Date: Wed Mar 23 17:42:11 UTC 2011
Modified Files: src/sys/nfs: nfs_socket.c Log Message: As suggested by matt@: change socket buffer reservations for NFS send/receive to 3 times max RPC size rather than 2 times. Avoids nasty TCP stalls observed at Panix. Will require increase to sbmax via sysctl for those running really huge NFS rsize/wsize (>64K). To generate a diff of this commit: cvs rdiff -u -r1.188 -r1.189 src/sys/nfs/nfs_socket.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/nfs/nfs_socket.c diff -u src/sys/nfs/nfs_socket.c:1.188 src/sys/nfs/nfs_socket.c:1.189 --- src/sys/nfs/nfs_socket.c:1.188 Fri Dec 17 22:22:00 2010 +++ src/sys/nfs/nfs_socket.c Wed Mar 23 17:42:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_socket.c,v 1.188 2010/12/17 22:22:00 yamt Exp $ */ +/* $NetBSD: nfs_socket.c,v 1.189 2011/03/23 17:42:11 tls Exp $ */ /* * Copyright (c) 1989, 1991, 1993, 1995 @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.188 2010/12/17 22:22:00 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.189 2011/03/23 17:42:11 tls Exp $"); #ifdef _KERNEL_OPT #include "opt_nfs.h" @@ -292,13 +292,13 @@ so->so_snd.sb_timeo = 0; } if (nmp->nm_sotype == SOCK_DGRAM) { - sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR) * 2; + sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR) * 3; rcvreserve = (max(nmp->nm_rsize, nmp->nm_readdirsize) + NFS_MAXPKTHDR) * 2; } else if (nmp->nm_sotype == SOCK_SEQPACKET) { - sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR) * 2; + sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR) * 3; rcvreserve = (max(nmp->nm_rsize, nmp->nm_readdirsize) + - NFS_MAXPKTHDR) * 2; + NFS_MAXPKTHDR) * 3; } else { sounlock(so); if (nmp->nm_sotype != SOCK_STREAM) @@ -314,9 +314,9 @@ sizeof(val)); } sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR + - sizeof (u_int32_t)) * 2; + sizeof (u_int32_t)) * 3; rcvreserve = (nmp->nm_rsize + NFS_MAXPKTHDR + - sizeof (u_int32_t)) * 2; + sizeof (u_int32_t)) * 3; solock(so); } error = soreserve(so, sndreserve, rcvreserve);