From owner-freebsd-hackers Wed Nov 13 09:44:23 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA00874 for hackers-outgoing; Wed, 13 Nov 1996 09:44:23 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id JAA00864 for ; Wed, 13 Nov 1996 09:44:16 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id KAA22431; Wed, 13 Nov 1996 10:32:19 -0700 From: Terry Lambert Message-Id: <199611131732.KAA22431@phaeton.artisoft.com> Subject: Re: Even more info on daily panics... To: dg@root.com Date: Wed, 13 Nov 1996 10:32:19 -0700 (MST) Cc: michaelh@cet.co.jp, ponds!rivers@dg-rtp.dg.com, Hackers@FreeBSD.org In-Reply-To: <199611130504.VAA07192@root.com> from "David Greenman" at Nov 12, 96 09:04:57 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > I would also like to hear an explaination of how it is possible, after the > patch to vrele to prevent it from going negative, for a vnode with a non-zero > v_usecount can be on the freelist in the first place. Please check my previous mail... There is a race condition caused by the fact that the vnode reclamation is "smeared" across the VFS/FS boundry layer. It is not obvious unless you consider interfaces to represent access points for automatons instead of simply functional abstractions of object complexity (ie: it is an artifact of layering errors). Another way of stating this is to think of execution contexts as moving from place to place, rather than sleeping and waking up. It's very important to view things like this in any case for SMP, where a context should be considered as an anonymous, schedulable resource to apply to outstanding work-to-do. The only difference here is that there is only one schedulable resource, and we currently do not have to worry about reentrancy. The problem with a "smeared" task is that you can "reenter" without crossing the interface boundry... so protecting against recossing the boundry does not necessarily protect against the race condition. This really needs a whiteboard; I explain better with pictures, and "ascii art" just won't cut it for drawing a cyclic graph. 8-(. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.