Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 May 1997 11:04:33 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Poul-Henning Kamp <phk@dk.tfs.com>
Cc:        current@freebsd.org
Subject:   Re: vnode->v_usage 
Message-ID:  <Pine.BSF.3.95q.970502105721.331D-100000@herring.nlsystems.com>
In-Reply-To: <207.862417862@critter>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 30 Apr 1997, Poul-Henning Kamp wrote:

> In message <Pine.BSF.3.95q.970427143216.346G-100000@herring.nlsystems.com>, 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.970502105721.331D-100000>