From: Steve Long <slong@rathaus.eclipse.co.uk>
To: linux-btrfs@vger.kernel.org
Subject: Re: btrfs_tree_lock & trylock
Date: Tue, 9 Sep 2008 00:26:34 +0100 [thread overview]
Message-ID: <200809090026.34318.slong@rathaus.eclipse.co.uk> (raw)
In-Reply-To: <1220887714.8537.45.camel@think.oraclecorp.com>
On Monday 08 September 2008 16:28:34 Chris Mason wrote:
> > People seem to repeatedly come up with adaptive mutex based on intuitive
> > hunch, and never do much analysis before or afterwards.
>
> In my case, it very easy to measure. Just watch the context switch rate
> on any metadata intensive workload. The current code scores higher on
> benchmarks and uses less system time overall.
>
Given that it's system-dependent, perhaps making the 512 a #define'd value
(defaulting to 512) while it's current, might be worth doing? That would
allow users to test via different values passed to make, and so gather more
data, or just use the setting they prefer, if they're bothered.
At least until the adaptive mutex API is worked out (which might well take the
number of attempts to spin/relax as a parameter. I'd add a shouldYield [for
before final acquisition] and keep the ifSleeping as implicit in another fn,
based on what I've read, but thankfully that's not my problem.)
next prev parent reply other threads:[~2008-09-08 23:26 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 [this message]
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
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=200809090026.34318.slong@rathaus.eclipse.co.uk \
--to=slong@rathaus.eclipse.co.uk \
--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