From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: Regression introduced by bfcfaa77bdf0f775263e906015982a608df01c76 (vfs: use 'unsigned long' accesses for dcache name comparison and hashing)
Date: Thu, 22 Mar 2012 20:44:00 +0000 [thread overview]
Message-ID: <20120322204400.GD6589@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CA+55aFyiNKdkkvK0FH1ibo1iJj1HF9RjLEw3VOEjVwc0eiX8Sw@mail.gmail.com>
On Thu, Mar 22, 2012 at 01:38:28PM -0700, Linus Torvalds wrote:
> On Thu, Mar 22, 2012 at 1:24 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > OK, full_name_hash()/hash_name() definitely have a mismatch and it's on the
> > names of length 8*n: trivial experiment shows that we have
> > name hash_name full_name_hash
>
> Good catch, guys.
>
> Ugh. And I never noticed despite having run this code on my machines
> for several weeks, because I don't think I have anything that uses the
> "full_name_hash()" function. And it looked so obviously the same.
>
> > Linus, which way do you prefer to shift it? ?Should hash_name() change to
> > match full_name_hash() or should it be the other way round?
> >
> > What happens is that you get multiplication by 9 and adding 0 in the former,
> > after having added the last full word. ?In the latter we add the last full
> > word, see that there's nothing left and bugger off.
>
> Yes. I think we should make things match "hash_name()", because that's
> the one that is critical and we want to really generate good code for.
>
> I think you can just move the "*=9" down in full_name_hash(), so that
> we always "pre-multiply" the hash for the next round. But I'll have
> to double-check my logic.
See upthread for diff doing just that ;-) Let's see if that fixes the
crap guys are seeing... BTW, you have used full_name_hash(), just not
on something 8 char long - devpts uses d_alloc_name(), but pty numbers
tend to be less than ten millions...
next prev parent reply other threads:[~2012-03-22 20:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-22 18:38 Regression introduced by bfcfaa77bdf0f775263e906015982a608df01c76 (vfs: use 'unsigned long' accesses for dcache name comparison and hashing) Konrad Rzeszutek Wilk
2012-03-22 19:33 ` Eric Paris
2012-03-22 20:03 ` Eric Paris
2012-03-22 20:10 ` Al Viro
2012-03-22 20:09 ` Al Viro
2012-03-22 20:24 ` Al Viro
2012-03-22 20:36 ` Al Viro
2012-03-22 20:42 ` Linus Torvalds
2012-03-22 21:41 ` Konrad Rzeszutek Wilk
2012-03-22 21:54 ` Linus Torvalds
2012-03-22 21:59 ` Al Viro
2012-03-22 20:38 ` Linus Torvalds
2012-03-22 20:44 ` Al Viro [this message]
2012-03-22 20:52 ` 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=20120322204400.GD6589@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=xen-devel@lists.xensource.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