From: torvalds@transmeta.com (Linus Torvalds)
To: linux-kernel@vger.kernel.org
Subject: Re: dentry cache order 7 is broken
Date: 8 Feb 2001 17:21:20 -0800 [thread overview]
Message-ID: <95vgmg$i9u$1@penguin.transmeta.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0102072302030.5947-100000@twinlark.arctic.org>
In article <Pine.LNX.4.33.0102072302030.5947-100000@twinlark.arctic.org>,
dean gaudet <dean-list-linux-kernel@arctic.org> 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);
Cool.
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.
Thanks..
Linus
-
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/
prev parent reply other threads:[~2001-02-09 1:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-08 7:15 dentry cache order 7 is broken dean gaudet
2001-02-08 8:10 ` David S. Miller
2001-02-08 8:22 ` Mitchell Blank Jr
2001-02-08 9:22 ` David S. Miller
2001-02-09 0:36 ` dean gaudet
2001-02-09 1:21 ` Linus Torvalds [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='95vgmg$i9u$1@penguin.transmeta.com' \
--to=torvalds@transmeta.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox