From: Chris Mason <chris.mason@oracle.com>
To: Chris Mason <chris.mason@oracle.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 2/2] Btrfs: switch to reader/writer locks for metadata
Date: Tue, 19 Jul 2011 21:13:14 -0400 [thread overview]
Message-ID: <1311124334-sup-595@shiny> (raw)
In-Reply-To: <1311096777-sup-5422@shiny>
Excerpts from Chris Mason's message of 2011-07-19 13:33:45 -0400:
> Btrfs: switch the btrfs tree locks to reader/writer
>
> The btrfs metadata btree is the source of significant
> lock contention, especially in the root node. This
> commit changes our locking to use a reader/writer
> lock.
>
> The lock is built on top of mutexes, which are much faster
> for dealing with heavy write contention. We don't try
> very hard to be fair, from a latency point of view
> allowing the readers to come in is very important.
>
> In read heavy workloads this is dramatically faster. In write
> heavy workloads we're often faster because of less contention
> on the root node lock.
>
> We suffer slightly in dbench because we schedule more often
> during write locks. This still has some adaptive spinning
> in the btrfs code, which I'm trying to get rid of long term.
Hi everyone,
One extra bit is missing from this patch, which is the lockdep
annotations required to keep lockdep happy. I'll get those out as well,
but if you want to test it, please disable lockdep.
-chris
prev parent reply other threads:[~2011-07-20 1:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-19 17:33 [PATCH 2/2] Btrfs: switch to reader/writer locks for metadata Chris Mason
2011-07-20 1:13 ` Chris Mason [this message]
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=1311124334-sup-595@shiny \
--to=chris.mason@oracle.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;
as well as URLs for NNTP newsgroup(s).