Re: dentry cache order 7 is broken

David S. Miller (davem@redhat.com)
Thu, 8 Feb 2001 00:10:13 -0800 (PST)


dean gaudet writes:
> also, for order > 7, was the real intention to use a shift of
> (order*2)&31?

No, the whole thing is buggered. How stupid, my fault.
It was the 64-bit platform fascist at work :-)

How does this work for you (against 2.4.x)?

--- fs/dcache.c.~1~ Tue Feb 6 23:00:58 2001
+++ fs/dcache.c Thu Feb 8 00:09:10 2001
@@ -696,7 +696,8 @@
static inline struct list_head * d_hash(struct dentry * parent, unsigned long hash)
{
hash += (unsigned long) parent / L1_CACHE_BYTES;
- hash = hash ^ (hash >> D_HASHBITS) ^ (hash >> D_HASHBITS*2);
+ hash = hash ^ (hash >> D_HASHBITS) ^
+ (hash >> (D_HASHBITS+(D_HASHBITS/2)));
return dentry_hashtable + (hash & D_HASHMASK);
}

-
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/