Consider for readdir chunk sizes when tuning socket buffer reservations.
Obtained from: NetBSD
This commit is contained in:
parent
dde4499fec
commit
6c1a945540
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=36513
@ -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");
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user