From owner-freebsd-hackers Mon Apr 28 00:21:23 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id AAA28365 for hackers-outgoing; Mon, 28 Apr 1997 00:21:23 -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 AAA28357; Mon, 28 Apr 1997 00:21:17 -0700 (PDT) Received: from critter (localhost [127.0.0.1]) by critter.dk.tfs.com (8.8.5/8.8.5) with ESMTP id JAA00240; Mon, 28 Apr 1997 09:19:30 +0200 (CEST) To: Bakul Shah cc: Poul-Henning Kamp , hackers@freebsd.org From: Poul-Henning Kamp Subject: Re: the namei cache... In-reply-to: Your message of "Mon, 28 Apr 1997 01:37:44 EDT." <199704280537.BAA27601@chai.plexuscom.com> Date: Mon, 28 Apr 1997 09:19:30 +0200 Message-ID: <238.862211970@critter> Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In message <199704280537.BAA27601@chai.plexuscom.com>, Bakul Shah writes: >The bound is not so low as in the namei cache case but reuse >policies do matter. The point of analogy was not to duplicate what >they do but to remind you to check out the range of techniques they >use. May be some of them are useful? ... and there is no locking to consider, no reentrancy, no smp and so on. Quite different in fact. >> You obviously don't know how the name cache operates. Only names >> you lookup ends up in the cache, it's not the entire directory >> that gets put into the cache (unless you do a "ls -l" that is). "Cliff's notes to Kernel Name Cache": The most important thing is hit-rate. Everytime we have a hit we save at least one disk-access. That means that if we can get just one more hit in he namecache, we can safely spend several msec finding it. >My comment about scaling stands. Indeed, but compared to the >real< metric for name-cache efficiency, it's not terribly important. >> I wish all of these "instant-fs" specialists would read up on their >> subject matter before they jump in with their misunderstandings! > >I wish all of these "instant-optimization" specialists would do some >profiling before they start hacking with their misunderstandings! I don't know of anybody besides me who have profiled the name cache... If you check out the commit logs, you will know how long time I've been working on it... >Try not to assume that anything that does not make sense to you is >automatically meaningless. Bakul, I wasn't particularly after you with that comment, it was more pointed at the people who suggested new hash algorithms without understanding the nature of the cache and what it does for the kernel. I have no doubt you know what you talk about, but you are headed down the wrong track. The performance question is: How do we get the best hit rate from the least use of memory & CPU. I can tell you that I have not found measurable difference in cpu usage with our without the hashing, (wcarchive will probably show something though), but I have seen significant impact by upping the hit rate just a tiny fraction of a percent. Considering that fact, spending two pages on a hash table may not be the most efficient use of memory... -- 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.