From owner-freebsd-bugs Tue Apr 22 12:50:57 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA17488 for bugs-outgoing; Tue, 22 Apr 1997 12:50:57 -0700 (PDT) Received: from dg-rtp.dg.com (dg-rtp.rtp.dg.com [128.222.1.2]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id MAA17218 for ; Tue, 22 Apr 1997 12:50:36 -0700 (PDT) Received: by dg-rtp.dg.com (5.4R3.10/dg-rtp-v02) id AA06956; Tue, 22 Apr 1997 15:50:02 -0400 Received: from ponds by dg-rtp.dg.com.rtp.dg.com; Tue, 22 Apr 1997 15:50 EDT Received: from lakes.water.net (lakes [10.0.0.3]) by ponds.water.net (8.8.3/8.7.3) with ESMTP id PAA06243; Tue, 22 Apr 1997 15:36:35 -0400 (EDT) Received: (from rivers@localhost) by lakes.water.net (8.8.3/8.6.9) id PAA04688; Tue, 22 Apr 1997 15:43:07 -0400 (EDT) Date: Tue, 22 Apr 1997 15:43:07 -0400 (EDT) From: Thomas David Rivers Message-Id: <199704221943.PAA04688@lakes.water.net> To: ponds!nlsystems.com!dfr, ponds!lakes.water.net!rivers Subject: Re: kern/3304: NFS V2 readdir hangs Cc: ponds!freebsd.org!freebsd-bugs Content-Type: text Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Doug Rabson writes: > > Now, I see you set the rcvreserve to "(nm_rsize + NFS_MAXPKTHDR) * 2" > > which, for me was enough - but can we determine just what is 'really' > > enough, or is this just a better guess? [Is it guaranteed to be > > enough because you bump the readdirsize down to the rsize is rsize > > is the lesser of the two?] > > In the existing code, the main problem I can see is that nm_readdirsize is > allowed to be larger than nm_rsize and indeed is forced to be a minimum of > 4k for some spurious reason. This would mean that if you set nm_rsize to > 1024, you would be guaranteed a hang for the first readdir larger than > about 1200 bytes. Ahh - I see... the socket buf was much smaller (because it's based on rsize) than the readdirsize... > Did your hang happen with or without -r1024, or both? It definately happened with -r1024 - I don't believe I tried it without a -r1024. > > I still don't quite understand the rules used by the socketbuf for these > sizes. It may be that just forcing nm_readdirsize <= nm_rsize is enough. > I doubled the size to make it the same as the SEQPACKET and STREAM case; I > don't think it will do any harm to leave it doubled. Ok - that sounds reasonable. I was wondering if we could deduce that doubled will always be adequate... Here's another question - I thought -I on mount_nfs was supposed to set the readdirsize... if not, should there be an option on mount_nfs that lets you set this? Such an option could be handy if we run into a similar problem in the future... - Dave Rivers -