From owner-freebsd-current Fri May 2 05:14:49 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id FAA27682 for current-outgoing; Fri, 2 May 1997 05:14:49 -0700 (PDT) Received: from nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id FAA27676 for ; Fri, 2 May 1997 05:14:45 -0700 (PDT) Received: from herring.nlsystems.com (herring.nlsystems.com [10.0.0.2]) by nlsystems.com (8.8.5/8.8.5) with SMTP id NAA06750; Fri, 2 May 1997 13:14:47 +0100 (BST) Date: Fri, 2 May 1997 13:14:47 +0100 (BST) From: Doug Rabson To: Poul-Henning Kamp cc: current@freebsd.org Subject: Re: vnode->v_usage In-Reply-To: <5321.862569821@critter> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Fri, 2 May 1997, Poul-Henning Kamp wrote: > > >I don't have any performance numbers but it seems to work fine. I think > >the cache should just call vtouch for all vnodes and not check the usage > >count. > OK. > > >Also vtouch should take the v_interlock simple_lock before reading > >the v_usecount field as specified by vnode.h. > > Ok, now I'm in doubt here... Which of these two places are the > correct place to release the interlock, I've marked the candidates > with XXX, I pressume the later, right ? I think that you don't need the v_interlock for using v_freelist so probably releasing it earlier is better. Maybe something like: int usecount; simple_lock(&vp->v_interlock); usecount = vp->v_usecount; simple_unlock(&vp->v_interlock); if (usecount) ... ... -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 951 1891