Messages in this thread | | | Date | Wed, 22 Sep 1999 18:37:11 +0200 (CEST) | From | Andrea Arcangeli <> | Subject | Re: [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/
| |