public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Andi Kleen <ak@suse.de>
Cc: Daniel Phillips <phillips@google.com>,
	Mark Fasheh <mark.fasheh@oracle.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com
Subject: Re: [Ocfs2-devel] Ocfs2 performance bugs of doom
Date: Fri, 10 Mar 2006 16:14:29 +1100	[thread overview]
Message-ID: <44110B35.8040903@yahoo.com.au> (raw)
In-Reply-To: <44101FE8.9050105@yahoo.com.au>

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 

  reply	other threads:[~2006-03-10  5:14 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-03 22:27 Ocfs2 performance bugs of doom Daniel Phillips
2006-03-04  0:53 ` Mark Fasheh
2006-03-04  3:42   ` Daniel Phillips
2006-03-04  7:36 ` Andrew Morton
2006-03-05 19:22   ` Mark Fasheh
2006-03-06  1:28   ` Daniel Phillips
2006-03-06  2:58     ` [Ocfs2-devel] " Mark Fasheh
2006-03-06  4:59       ` Daniel Phillips
2006-03-06 19:51         ` Mark Fasheh
2006-03-07  3:34           ` Andi Kleen
2006-03-07  4:58             ` Mark Fasheh
2006-03-07  6:56               ` [Ocfs2-devel] " Daniel Phillips
2006-03-09  6:26               ` Daniel Phillips
2006-03-09  7:26                 ` Nick Piggin
2006-03-09  7:43                 ` Nick Piggin
2006-03-09  4:19                   ` Andi Kleen
2006-03-09 12:30                     ` Nick Piggin
2006-03-10  5:14                       ` Nick Piggin [this message]
2006-03-10  0:21                 ` [Ocfs2-devel] Ocfs2 performance Mark Fasheh
2006-03-10  1:14                   ` Bernd Eckenfels
2006-03-10  7:10                     ` Joel Becker
2006-03-11  1:09                     ` Mark Fasheh
2006-03-11  1:57                       ` Bernd Eckenfels
2006-03-10 11:17                   ` Daniel Phillips
2006-03-10 18:23                     ` Zach Brown
2006-03-10 21:13                       ` Daniel Phillips
2006-03-10 21:13                     ` Daniel Phillips
2006-03-10  2:33                 ` [Ocfs2-devel] Ocfs2 performance bugs of doom J. Bruce Fields
2006-03-10 10:27                   ` Daniel Phillips

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=44110B35.8040903@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.fasheh@oracle.com \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=phillips@google.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