From owner-freebsd-fs Thu Apr 24 05:30:20 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id FAA03876 for fs-outgoing; Thu, 24 Apr 1997 05:30:20 -0700 (PDT) Received: from parkplace.cet.co.jp (parkplace.cet.co.jp [202.32.64.1]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id FAA03867 for ; Thu, 24 Apr 1997 05:30:18 -0700 (PDT) Received: from localhost (michaelh@localhost) by parkplace.cet.co.jp (8.8.5/CET-v2.1) with SMTP id MAA13844; Thu, 24 Apr 1997 12:30:02 GMT Date: Thu, 24 Apr 1997 21:30:02 +0900 (JST) From: Michael Hancock To: David Greenman cc: Poul-Henning Kamp , fs@freebsd.org Subject: Re: the namei cache... In-Reply-To: <199704241208.FAA09111@root.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-fs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Thu, 24 Apr 1997, David Greenman wrote: > It's interesting that the single largest CPU consumer on wcarchive appears > to be the namei cache lookups. I think the hash algorithm needs to be > re-visited at the very least, perhaps changing the divide by a prime into > some sort of xor of the filename characters (xored in pairs as int16's). I don't think you need to even look at all the characters. You can take the first and last and couple in the middle. To get the middle ones, instead of dividing the length by 2 do a bit shift on the length. Then xor the 2 pairs. Any hash guru's on the list? Mike Hancock