From owner-freebsd-current Fri May 2 03:04:55 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id DAA23415 for current-outgoing; Fri, 2 May 1997 03:04:55 -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 DAA23409 for ; Fri, 2 May 1997 03:04:51 -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 LAA04707; Fri, 2 May 1997 11:04:33 +0100 (BST) Date: Fri, 2 May 1997 11:04:33 +0100 (BST) From: Doug Rabson To: Poul-Henning Kamp cc: current@freebsd.org Subject: Re: vnode->v_usage In-Reply-To: <207.862417862@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 Wed, 30 Apr 1997, Poul-Henning Kamp wrote: > In message , Dou > g Rabson writes: > >On Sun, 27 Apr 1997, Poul-Henning Kamp wrote: > >> > >> Unless somebody convinces me of the utility of this field, I will remove > >> it from the vnodes. > >> > >I think it is intended to be used to keep frequently used vnodes from > >being recycled by getnewvnode. > > Well, I've done it. Here is a patch that implements LRU for name-cache > hits on the vnode freelist. I doubt that it has any performance impact, > but it makes the vnode 4 bytes smaller, which is a good thing. > > Please test and report. 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. Also vtouch should take the v_interlock simple_lock before reading the v_usecount field as specified by vnode.h. I know we have a long way to go before we get to an SMP vfs but the Lite2 is a lot cleaner than the old code and we should try to keep to the rules when accessing fields of the vnode. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 951 1891