Subject: Re: New hash algorithm - FNV - for use in the kernel
To: Luke Mewburn <email@example.com>
From: David Laight <David.Laight@btinternet.com>
Date: 11/27/2001 11:34:24
> Take a look at the existing implementation of nfs_hash(); it does not
> appear to me that there's a deliberate part of the code that's trying
> to specifically limit the hash distribution to around 1000. The code
> currently just sums up all the bytes in the filehandle and returns
> that as the hash value.
No wonder it generates a bad hash for large tables.... a lot of bytes
in a (typical) file handle are zero.
Even for a small table, summing the bytes is an expensive hash function!
Given the way that (the only file handles I've looked at in detail)
were generated, you would be better picking out the 32 bits that
are the inode number on the target filesystem.