From owner-freebsd-current Sun Apr 27 06:37:11 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id GAA11782 for current-outgoing; Sun, 27 Apr 1997 06:37:11 -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 GAA11775 for ; Sun, 27 Apr 1997 06:37:07 -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 OAA12909; Sun, 27 Apr 1997 14:36:36 +0100 (BST) Date: Sun, 27 Apr 1997 14:36:36 +0100 (BST) From: Doug Rabson To: Poul-Henning Kamp cc: current@freebsd.org Subject: Re: vnode->v_usage In-Reply-To: <4647.862145535@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 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