Re: dentry cache order 7 is broken

From: Linus Torvalds (
Date: Thu Feb 08 2001 - 20:21:20 EST

In article <>,
dean gaudet <> wrote:
>if you've got 512Mb of RAM you end up with a dentry cache of order 7 --
>65536 entries.
>this results in a D_HASHBITS of 16. if you look at d_hash it contains
>this code:
> hash = hash ^ (hash >> D_HASHBITS) ^ (hash >> D_HASHBITS*2);


Just remove the third part altogether. The "hash" is only 32 bits
anyway (even on 64-bit platforms, as we don't want to blow up the dentry
size unnecessarily). And with most machines with reasonable memory, you
already get fine distribution with just two terms (ie you don't lose any
bits), and it speeds it up and avoids the problem you see.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Thu Feb 15 2001 - 21:00:13 EST