From: Dan Williams <dan.j.williams@intel.com>
To: linux-raid@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: [RFC PATCH 0/2] more raid456 thread pool experimentation
Date: Wed, 24 Mar 2010 07:53:10 -0700 [thread overview]
Message-ID: <20100324144904.15371.2317.stgit@dwillia2-linux> (raw)
The current implementation with the async thread pool ends up spreading
the work over too many threads. The btrfs workqueue is targeted at high
cpu utilization works and has a threshold mechanism to limit thread
spawning. Unfortunately it still ends up increasing cpu utilization
without a comparable improvement in throughput. Here are the numbers
relative to the multicore disabled case:
idle_thresh throughput cycles
4 +0% +102%
64 +4% +63%
128 +1% +45%
This appears to show that something more fundamental needs to happen to
take advantage of percpu raid processing. More profiling is needed, but
the suspects in my mind are conf->device_lock contention and the fact
that all work is serialized through conf->handle_list with no method for
encouraging stripe_head to thread affinity.
The idle_thresh parameter translates to the number of stripes that can
be in a thread's backlog before new work spills over into a new thread.
The current implementation via async is effectively using a threshold of
zero which ends up impacting throughput due to excessive cpu utilization
and thread creation. I do not think we need any more experimentation
before declaring the current implementation broken.
---
Dan Williams (2):
btrq: uplevel the btrfs thread pool for md/raid456 usage
md/raid456: switch to btrq for multicore operation
drivers/md/Kconfig | 1
drivers/md/raid5.c | 79 +++++++++++++----------
drivers/md/raid5.h | 13 ++--
fs/btrfs/Kconfig | 1
fs/btrfs/Makefile | 2 -
fs/btrfs/ctree.h | 22 +++---
fs/btrfs/disk-io.c | 157 +++++++++++++++++++++++-----------------------
fs/btrfs/extent-tree.c | 7 +-
fs/btrfs/inode.c | 18 +++--
fs/btrfs/relocation.c | 22 +++---
fs/btrfs/volumes.c | 12 ++--
fs/btrfs/volumes.h | 4 +
include/linux/btrqueue.h | 36 +++++------
lib/Kconfig | 6 ++
lib/Makefile | 2 +
lib/btrqueue.c | 119 ++++++++++++++++++-----------------
16 files changed, 265 insertions(+), 236 deletions(-)
rename fs/btrfs/async-thread.h => include/linux/btrqueue.h (76%)
rename fs/btrfs/async-thread.c => lib/btrqueue.c (82%)
next reply other threads:[~2010-03-24 14:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-24 14:53 Dan Williams [this message]
2010-03-24 14:53 ` [RFC PATCH 1/2] btrq: uplevel the btrfs thread pool for md/raid456 usage Dan Williams
2010-03-24 14:53 ` [RFC PATCH 2/2] md/raid456: switch to btrq for multicore operation Dan Williams
2010-03-24 15:51 ` [RFC PATCH 0/2] more raid456 thread pool experimentation Chris Mason
2010-03-24 18:06 ` Dan Williams
2010-03-24 19:31 ` Chris Mason
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=20100324144904.15371.2317.stgit@dwillia2-linux \
--to=dan.j.williams@intel.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-raid@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).