lkml.org 
[lkml]   [2006]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] Cache align futex hash buckets
On Wed, Feb 22, 2006 at 05:51:44PM -0800, Ravikiran G Thirumalai wrote:
> On Wed, Feb 22, 2006 at 12:50:49PM -0800, Andrew Morton wrote:
> > Ravikiran G Thirumalai <kiran@scalex86.org> wrote:
> > >
> > > We also collected hash collision statistics for 1024 slots. We found that
> > > 50% of the slots did not take any hit!! So maybe we should revisit the
> > > hashing function before settling on the optimal number of hash slots.
> >
> > You could try switching from jhash2() to hash_long().
>
> OK, I will try that.
>
> >
> > Was there any particular pattern to the unused slots? Not something silly
> > like every second one?
>
> The distribution seems OK with 256 buckets, but with 1024 buckets, it goes
> bad. We see high hits every 4-6 buckets. Attaching the distribution

This pattern might not be bad as it avoids bouncing of spinlocks on the adjacent
hash buckets...but then there are high hits on adjacent buckets too.

(instrumentation done by Nippun)

Thanks,
Kiran
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-23 03:10    [W:0.172 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site