Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/nfs As suggested by matt@: change socket buffer reservat...
details: https://anonhg.NetBSD.org/src/rev/fe5e177c8d95
branches: trunk
changeset: 763528:fe5e177c8d95
user: tls <tls%NetBSD.org@localhost>
date: Wed Mar 23 17:42:11 2011 +0000
description:
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).
diffstat:
sys/nfs/nfs_socket.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (47 lines):
diff -r dabfdce49a37 -r fe5e177c8d95 sys/nfs/nfs_socket.c
--- a/sys/nfs/nfs_socket.c Wed Mar 23 13:57:40 2011 +0000
+++ b/sys/nfs/nfs_socket.c Wed Mar 23 17:42:11 2011 +0000
@@ -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);
Home |
Main Index |
Thread Index |
Old Index