lkml.org 
[lkml]   [2006]   [Mar]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 10 Mar 2006 16:14:29 +1100
FromNick Piggin <>
SubjectRe: [Ocfs2-devel] Ocfs2 performance bugs of doom
Nick Piggin wrote:
> Andi Kleen wrote:
>
>> On Thursday 09 March 2006 08:43, Nick Piggin wrote:
>>
>>
>>> Just interested: do the locks have any sort of locality of lookup?
>>> If so, then have you tried moving hot (ie. the one you've just found,
>>> or newly inserted) hash entries to the head of the hash list?
>>>
>>> In applications with really good locality you can sometimes get away
>>> with small hash tables (10s even 100s of collisions on average) without
>>> taking too big a hit this way, because your entries basically get sorted
>>> LRU for you.
>>
>>
>>
>> LRU hashes have really bad cache behaviour though if that is not the case
>> because you possibily need to bounce around the hash heads as DIRTY
>> cache lines instead of keeping them in SHARED state.
>> My feeling would be that scalability is more important for this, which
>> would
>> discourage this.
>>
>
> That's true, it would have to have very good locality of reference to
> be of use. In that case it is not always going to dirty the cachelines
> because you now only have to make your hash table size appropriate for
> your _working set_ rather than the entire set - if the working set is
> small enough and you make your hash say 4 times bigger than it, then
> you might expect to often hit the right lock at the head of the list.
>

OTOH, I suspect it actually isn't all that bad. There is already a
shared lock there, which will definitely have its cacheline invalidated.

So adding an extra cacheline bounce is not like the bad problem of going
from perfect scalability (no shared cachelines) to a single shared cacheline.

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com

-
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-03-10 06:17    [from the cache]
©2003-2009