Subject: Re: should I hashinit desiredvnodes or a fraction of it?
To: VaX#n8 <vax@carolina.rr.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 06/02/2004 17:43:33
--mvpLiMfbWzRoNl4x
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jun 02, 2004 at 04:11:27PM -0400, VaX#n8 wrote:
> Some file systems seem to allocate (via hashinit) one hash bucket
> for every desired vnode, (isn't that wasteful?), others some fraction
> of that.  Some file systems, like fdesc, allocate a fixed number
> (in TCFS, merely 16!), which seems undesirable.  What should TCFS
> allocate?  Consensus would seem to suggest desiredvnodes.

No, because then you aren't hashing. I'd say start with sixteen, or one=20
sixteenth of desiredvnodes.

It is especially wasteful as if you're using layered vnodes, you will=20
never have more than half of desiredvnodes in your hash table.

You also can change the value later.

Take care,

Bill

--mvpLiMfbWzRoNl4x
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFAvnQ1Wz+3JHUci9cRAuo9AJ0ePfDBK6nIFoT0ugACPwT/82UclACeK+CM
h4rgQ6uAs4KZMGCMzq3Ai8Q=
=IY31
-----END PGP SIGNATURE-----

--mvpLiMfbWzRoNl4x--