David S. Miller wrote:
> - hash = hash ^ (hash >> D_HASHBITS) ^ (hash >> D_HASHBITS*2);
> + hash = hash ^ (hash >> D_HASHBITS) ^
> + (hash >> (D_HASHBITS+(D_HASHBITS/2)));
Two comments:
1. The inode-cache has the exact same problem, but it'll require a lot
of RAM to run into it. The buffer and page caches don't have the
same problem.
2. Given that D_HASHBITS is not a constant I wonder if there isn't
a more efficient hash to be found. But I guess I'll leave that
to the hashing experts.
-Mitch
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu Feb 15 2001 - 21:00:11 EST