Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Apr 1997 17:07:43 -0400 (EDT)
From:      Peter Dufault <dufault@hda.com>
To:        dfr@nlsystems.com (Doug Rabson)
Cc:        current@freebsd.org
Subject:   Re: vnode->v_usage
Message-ID:  <199704272107.RAA14375@hda.hda.com>
In-Reply-To: <Pine.BSF.3.95q.970427143216.346G-100000@herring.nlsystems.com> from Doug Rabson at "Apr 27, 97 02:36:36 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> I think it is intended to be used to keep frequently used vnodes from
> being recycled by getnewvnode.  The idea is that whenever a vnode is found
> as a hit in the cache, its usage is increased.  When getvnode picks a
> vnode off the front of the free list, it checks the usage and if >0 it
> decrements it, puts it at the back of the queue and goes onto the next
> one.  This means that the lifetime of commonly used vnodes is extended.  I
> don't know why it is clamped; possibly to put an upper bound on the
> lifetime of the vnode when it stops being used so frequently.

Warning: I'm going strictly by your description without looking at
the code, but instead of clamping to avoid "integrator windup"
put the cache-hit vnode at the tail of the queue.

Peter

-- 
Peter Dufault (dufault@hda.com)   Realtime Machine Control and Simulation
HD Associates, Inc.               Voice: 508 433 6936



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704272107.RAA14375>