From owner-freebsd-current Sun Apr 27 14:08:41 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id OAA28766 for current-outgoing; Sun, 27 Apr 1997 14:08:41 -0700 (PDT) Received: from hda.hda.com (hda-bicnet.bicnet.net [207.198.1.121]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id OAA28760 for ; Sun, 27 Apr 1997 14:08:37 -0700 (PDT) Received: (from dufault@localhost) by hda.hda.com (8.8.5/8.8.5) id RAA14375; Sun, 27 Apr 1997 17:07:44 -0400 (EDT) From: Peter Dufault Message-Id: <199704272107.RAA14375@hda.hda.com> Subject: Re: vnode->v_usage In-Reply-To: from Doug Rabson at "Apr 27, 97 02:36:36 pm" To: dfr@nlsystems.com (Doug Rabson) Date: Sun, 27 Apr 1997 17:07:43 -0400 (EDT) Cc: current@freebsd.org X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > 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