public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Chris Mason <chris.mason@oracle.com>
Cc: jim owens <jowens@hp.com>, Andi Kleen <andi@firstfloor.org>,
	linux-btrfs@vger.kernel.org
Subject: Re: btrfs_tree_lock & trylock
Date: Mon, 8 Sep 2008 09:49:42 -0700	[thread overview]
Message-ID: <20080908094942.5d6136e7@extreme> (raw)
In-Reply-To: <1220890832.8537.63.camel@think.oraclecorp.com>

On Mon, 08 Sep 2008 12:20:32 -0400
Chris Mason <chris.mason@oracle.com> wrote:

> On Mon, 2008-09-08 at 12:13 -0400, jim owens wrote:
> > Chris Mason wrote:
> > >> My guess is that the improvement happens mostly from the first couple of tries,
> > >> not from repeated spinning. And since it is a mutex, you could even do:
> > > 
> > > I started with lower spin counts, I really didn't want to spin at all
> > > but the current values came from trial and error.
> > 
> > Exactly the problem Steven is saying about adaptive locking.
> > 
> > Using benchmarks (or any test), on a small sample of systems
> > leads you to conclude "this design/tuning combination is better".
> > 
> > I've been burned repeatedly by that... ugly things happen
> > as you move away from your design testing center.
> > 
> > I'm not saying your code does not work, just that we need
> > a lot more proof with different configurations and loads
> > to see that is "at least no worse".
> 
> Oh, I completely agree.  This is tuned on just one CPU in a handful of
> workloads.  In general, it makes sense to spin for about as long as it
> takes someone to do a btree search in the block, which we could
> benchmark up front at mount time.
> 
> I could also get better results from an API where the holder of the lock
> indicates it is going to hold on to things for a while, which might
> happen right before doing an IO.
> 
> Over the long term these are important issues, but for today I'm focused
> on the disk format ;)
> 
> -chris
> 
> 

Not to mention the problem that developers seem to have faster machines than
average user, but slower than the enterprise and future generation CPU's.
So any tuning value seems to get out of date fast.

  reply	other threads:[~2008-09-08 16:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-08 11:10 btrfs_tree_lock & trylock Andi Kleen
2008-09-08 13:47 ` Chris Mason
2008-09-08 13:54   ` Andi Kleen
2008-09-08 14:02     ` Chris Mason
2008-09-08 14:20       ` Andi Kleen
2008-09-08 15:07         ` Stephen Hemminger
2008-09-08 15:28           ` Chris Mason
2008-09-08 23:26             ` Steve Long
2008-09-08 15:47           ` Andi Kleen
2008-09-08 15:50             ` Stephen Hemminger
2008-09-08 15:55               ` Chris Mason
2008-09-08 16:13                 ` jim owens
2008-09-08 16:20                   ` Chris Mason
2008-09-08 16:49                     ` Stephen Hemminger [this message]
2008-09-08 17:17                       ` Christoph Hellwig
2008-09-08 17:32                         ` Ric Wheeler
2008-09-08 23:28                           ` Steve Long
2008-09-08 17:16           ` adaptive mutexes, was " Christoph Hellwig

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=20080908094942.5d6136e7@extreme \
    --to=shemminger@vyatta.com \
    --cc=andi@firstfloor.org \
    --cc=chris.mason@oracle.com \
    --cc=jowens@hp.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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