lkml.org 
[lkml]   [1999]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] hashtable sizes for icache and dcache
On Wed, 22 Sep 1999, David S. Miller wrote:

>and TCP, with greatly improved hash functions for several of those.

The buffer hash you are using looks very slow in computing the hash even
if it may be the fairest in the math world.

>+/* After several hours of tedious analysis, the following hash
>+ * function won. Do not mess with it... -DaveM
>+ */
>+#define _hashfn(dev,block) \
>+ ((((dev)<<(bh_hash_shift - 6)) ^ ((dev)<<(bh_hash_shift - 9))) ^ \
>+ (((block)<<(bh_hash_shift - 6)) ^ ((block) >> 13) ^ ((block) << (bh_hash_shift - 12))))
>+#define hash(dev,block) hash_table[_hashfn(dev,block) & bh_hash_mask]

Thanks for the patch.

Andrea


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.060 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site