Date: Sun, 27 Apr 1997 14:36:36 +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.970427143216.346G-100000@herring.nlsystems.com> In-Reply-To: <4647.862145535@critter>
next in thread | previous in thread | raw e-mail | index | archive | help
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. > > If you will be trying to convince me, please explain why it's clamped > at 32 in vfs_cache.c. 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. -- 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.970427143216.346G-100000>