lkml.org 
[lkml]   [2018]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC][PATCH] <linux/stringhash.h>: fix end_name_hash() for 64bit long
On Mon, Feb 5, 2018 at 9:51 AM, Amir Goldstein <amir73il@gmail.com> wrote:
>
> and hash_32_generic() is just __hash_32() with zero shift.

Right. But that __hash_32() is very expensive and doesn't help.

So the patch as-is doesn't seem to buy anything, and only adds cost.

Note that the dentry code is a bit unusual, in that the final shift is
done later, in d_hash(). And that takes the _high_ bits of the hash,
so unlike a lot of other hash functions, the name hashing doesn't need
to try to spread the bits down to the low bits. The intermediate hash
value should be fine without any extra spreading.

Anyway, we did have numbers at one point. That's what really matters:
how good the actual hashing ends up being. So for me to take the
patch, I would need to see that it actually improves the hash bucket
spreading enough to be worth the cost.

Linus

\
 
 \ /
  Last update: 2018-02-05 18:58    [W:0.041 / U:0.016 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site