From: "David S. Miller" <davem@redhat.com>
To: Mitchell Blank Jr <mitch@sfgoth.com>
Cc: dean gaudet <dean-list-linux-kernel@arctic.org>,
linux-kernel@vger.kernel.org
Subject: Re: dentry cache order 7 is broken
Date: Thu, 8 Feb 2001 01:22:28 -0800 (PST) [thread overview]
Message-ID: <14978.25940.810790.934587@pizda.ninka.net> (raw)
In-Reply-To: <20010208002212.Q12227@sfgoth.com>
In-Reply-To: <Pine.LNX.4.33.0102072302030.5947-100000@twinlark.arctic.org> <14978.21605.98365.252519@pizda.ninka.net> <20010208002212.Q12227@sfgoth.com>
Mitchell Blank Jr writes:
> 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.
Yep, fix attached. You just need 1GB ram to hit that case.
> 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.
For the moment anything is better than when you hit this
bug :-)
--- fs/inode.c.~1~ Sun Feb 4 20:45:36 2001
+++ fs/inode.c Thu Feb 8 01:21:07 2001
@@ -729,7 +729,8 @@
static inline unsigned long hash(struct super_block *sb, unsigned long i_ino)
{
unsigned long tmp = i_ino + ((unsigned long) sb / L1_CACHE_BYTES);
- tmp = tmp + (tmp >> I_HASHBITS) + (tmp >> I_HASHBITS*2);
+ tmp = tmp + (tmp >> I_HASHBITS) +
+ (tmp >> (I_HASHBITS+(I_HASHBITS/2)));
return tmp & I_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/
next prev parent reply other threads:[~2001-02-08 9:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-08 7:15 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 [this message]
2001-02-09 0:36 ` dean gaudet
2001-02-09 1:21 ` Linus Torvalds
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=14978.25940.810790.934587@pizda.ninka.net \
--to=davem@redhat.com \
--cc=dean-list-linux-kernel@arctic.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mitch@sfgoth.com \
/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
all inboxes | Powered by JetHome®