Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Apr 1997 21:19:25 +0900 (JST)
From:      Michael Hancock <michaelh@cet.co.jp>
To:        Michael Smith <msmith@atrad.adelaide.edu.au>
Cc:        hackers@hub.freebsd.org
Subject:   Re: namei & hash functions
Message-ID:  <Pine.SV4.3.95.970426194637.23390B-100000@parkplace.cet.co.jp>
In-Reply-To: <199704260611.PAA05947@genesis.atrad.adelaide.edu.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 26 Apr 1997, Michael Smith wrote:

> > Not really necessary, GCC can see the constant multiply:
> 
> ... and on top of that, on an architecture where multiplying is faster
> than shift, add, it is likely to know this.

I also forgot to check the difference in the size of the hash table when
using the mask version vs. the prime version.

For example, with maxvnodes at 4824, the mask version gives you a hashsize 
of 4096 while the prime version gives you 4603.

I don't know if it's going to make much difference but I'm going to backup
and control this experiment a little better.  I'll fill the following data
points where missing:

1) Original.  Done.

2) Mask version only.

3) Double hashsize.

        nchashtbl = hashinit(desiredvnodes * 2, M_CACHE, &nchash);

4) Mult by 33, mask version.  Done.

5) Mult by 33, double hashsize.

I have a feeling that 2) is sufficient.  I might stop on 3).  I just got
news that we can start exploring I-405.

Mike Hancock





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SV4.3.95.970426194637.23390B-100000>