Consider for readdir chunk sizes when tuning socket buffer reservations.

Obtained from:  NetBSD
This commit is contained in:
peter 1998-05-31 17:57:43 +00:00
parent 2b239be950
commit 7246bc5193
3 changed files with 15 additions and 9 deletions

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95
* $Id: nfs_socket.c,v 1.32 1998/05/19 07:11:23 peter Exp $
* $Id: nfs_socket.c,v 1.33 1998/05/31 17:27:49 peter Exp $
*/
/*
@ -272,10 +272,12 @@ nfs_connect(nmp, rep)
}
if (nmp->nm_sotype == SOCK_DGRAM) {
sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR) * 2;
rcvreserve = (nmp->nm_rsize + NFS_MAXPKTHDR) * 2;
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;
rcvreserve = (nmp->nm_rsize + NFS_MAXPKTHDR) * 2;
rcvreserve = (max(nmp->nm_rsize, nmp->nm_readdirsize) +
NFS_MAXPKTHDR) * 2;
} else {
if (nmp->nm_sotype != SOCK_STREAM)
panic("nfscon sotype");

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95
* $Id: nfs_socket.c,v 1.32 1998/05/19 07:11:23 peter Exp $
* $Id: nfs_socket.c,v 1.33 1998/05/31 17:27:49 peter Exp $
*/
/*
@ -272,10 +272,12 @@ nfs_connect(nmp, rep)
}
if (nmp->nm_sotype == SOCK_DGRAM) {
sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR) * 2;
rcvreserve = (nmp->nm_rsize + NFS_MAXPKTHDR) * 2;
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;
rcvreserve = (nmp->nm_rsize + NFS_MAXPKTHDR) * 2;
rcvreserve = (max(nmp->nm_rsize, nmp->nm_readdirsize) +
NFS_MAXPKTHDR) * 2;
} else {
if (nmp->nm_sotype != SOCK_STREAM)
panic("nfscon sotype");

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95
* $Id: nfs_socket.c,v 1.32 1998/05/19 07:11:23 peter Exp $
* $Id: nfs_socket.c,v 1.33 1998/05/31 17:27:49 peter Exp $
*/
/*
@ -272,10 +272,12 @@ nfs_connect(nmp, rep)
}
if (nmp->nm_sotype == SOCK_DGRAM) {
sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR) * 2;
rcvreserve = (nmp->nm_rsize + NFS_MAXPKTHDR) * 2;
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;
rcvreserve = (nmp->nm_rsize + NFS_MAXPKTHDR) * 2;
rcvreserve = (max(nmp->nm_rsize, nmp->nm_readdirsize) +
NFS_MAXPKTHDR) * 2;
} else {
if (nmp->nm_sotype != SOCK_STREAM)
panic("nfscon sotype");