From owner-freebsd-fs Thu Apr 24 03:27:56 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id DAA29106 for fs-outgoing; Thu, 24 Apr 1997 03:27:56 -0700 (PDT) Received: from critter.dk.tfs.com ([140.145.230.252]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id DAA29070; Thu, 24 Apr 1997 03:27:47 -0700 (PDT) Received: from critter (localhost [127.0.0.1]) by critter.dk.tfs.com (8.8.5/8.8.5) with ESMTP id MAA00738; Thu, 24 Apr 1997 12:26:21 +0200 (CEST) To: Michael Hancock cc: Poul-Henning Kamp , fs@freebsd.org From: Poul-Henning Kamp Subject: Re: the namei cache... In-reply-to: Your message of "Thu, 24 Apr 1997 19:13:44 +0900." Date: Thu, 24 Apr 1997 12:26:21 +0200 Message-ID: <736.861877581@critter> Sender: owner-fs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >> Benefit: >> We can release the cache entries at the time we recycle the >> vnode, instead of the lazy release when we stumble across >> an invalid cache entry, resulting in a better cache utilization. > >Why can't this be done now? we would have to traverse either the all the hash lists, or the LRU lists to locate the entries. >> Benefit: >> We can do away with the v_id field, unless other parts of >> the kernel need it. > >That would be nice. Our vnodes are pretty big, 112 bytes? +64 bytes in the namecache structure :-( >> Benefit: >> We don't rely on the hash to level things out for us. > >What's wrong with relying on the hash? It's not needed. >> Benefit: >> We can lock with finer and more logical granularity (ie. per vnode) >> in the cache than we could otherwise do. > >It doesn't give you logical vnode granularity, but you could lock on >buckets. Which will lock out some other random number of vnodes (ie directories), where as the new scheme will lock only (the already locked directory we're looking in. -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@tfs.com TRW Financial Systems, Inc. Power and ignorance is a disgusting cocktail.