From owner-freebsd-current Sun Oct 18 14:13:40 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA09857 for freebsd-current-outgoing; Sun, 18 Oct 1998 14:13:40 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smtp04.primenet.com (smtp04.primenet.com [206.165.6.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA09836 for ; Sun, 18 Oct 1998 14:13:35 -0700 (PDT) (envelope-from tlambert@usr07.primenet.com) Received: (from daemon@localhost) by smtp04.primenet.com (8.8.8/8.8.8) id NAA21971; Sun, 18 Oct 1998 13:48:42 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp04.primenet.com, id smtpd021941; Sun Oct 18 13:48:41 1998 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id NAA10205; Sun, 18 Oct 1998 13:48:30 -0700 (MST) From: Terry Lambert Message-Id: <199810182048.NAA10205@usr07.primenet.com> Subject: Re: -current NFS problem To: dg@root.com Date: Sun, 18 Oct 1998 20:48:29 +0000 (GMT) Cc: tlambert@primenet.com, green@zone.syracuse.NET, grog@lemis.com, julian@whistle.com, mike@smith.net.au, bag@sinbin.demos.su, rock@cs.uni-sb.de, current@FreeBSD.ORG In-Reply-To: <199810160139.SAA22337@implode.root.com> from "David Greenman" at Oct 15, 98 06:39:34 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Actually that's not true. I can't speak for all of the NFS implementations > above, but at least in BSD/OS, it works only because they have warts all over > the place to sidestep the problems with not having FS node locking. OK, after having spent several hours trying to see what you mean here, I'm having a hard time understanding why locking the vnode that holds the pointer to the nfsnode data is not an implicit lock on the underlying nfsnode, just as it is for all other data that the vnode references. I can see a couple of cases where the nfsnode is not treated through the vnode that contains it, but it seems to me that that's where the bug is, and that explicit locks on the nfsnode would be rather a large amount of overhead to work around what is effectively a small set of vnode parameter pre-dereferences that shouldn't be occurring. One case is allocation, where the vnode container should be allocated and locked prior to manipulating the data pointer. Am I missing something? Has anyone asked Rick Macklem about this? > The > argument about FreeBSD vnode stacking/locking is simply meaningless if the > filesystem doesn't implement any node locking, so let's not confuse the > issue by bringing that up. IF the vnode lock implied an nfsnode (or inode) lock in all cases, and IF the nfsnode was never addressed, except through the vnode, and IF the vnode locking was done at a higher layer for all "bottom" FS's (where the vnode is not stacked on a vnode), and IF the requirement that the vnode be locked before a VOP call could be made against it was uniformly enforced, THEN I think there would be no NFS problems, nor a need for nfsnode locking above and beyond the vnode locking. This speaks directly to the call graph inversion (a pervasive problem in many places in the current VFS code, not just NFS), and in particular the inversion in the VOP_LOCK code, and, to a lesser extent, the non-management of vnodes by the FS's in which they represent objects. I also have to say that the *by far* most common problem I encounter in my frequently daily use of NFS (my home directory at work is NFS mounted) is lost UDP packets not getting retried or timed out. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message