From owner-freebsd-fs Thu Apr 24 06:43:55 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id GAA06678 for fs-outgoing; Thu, 24 Apr 1997 06:43:55 -0700 (PDT) Received: from critter.dk.tfs.com (phk.cybercity.dk [195.8.129.17]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id GAA06664; Thu, 24 Apr 1997 06:43:21 -0700 (PDT) Received: from critter (localhost [127.0.0.1]) by critter.dk.tfs.com (8.8.5/8.8.5) with ESMTP id PAA00359; Thu, 24 Apr 1997 15:42:24 +0200 (CEST) To: Michael Hancock cc: David Greenman , 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 21:30:02 +0900." Date: Thu, 24 Apr 1997 15:42:23 +0200 Message-ID: <357.861889343@critter> Sender: owner-fs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In message , Mich ael Hancock writes: > >> It's interesting that the single largest CPU consumer on wcarchive appear >s >> 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? I'd rather get rid of it entirely... -- 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.