From: Shaohua Li <shli@kernel.org>
To: Tejun Heo <tj@kernel.org>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org,
neilb@suse.de, djbw@fb.com
Subject: Re: [patch 1/3] raid5: offload stripe handle to workqueue
Date: Wed, 31 Jul 2013 09:24:34 +0800 [thread overview]
Message-ID: <20130731012434.GA1504@kernel.org> (raw)
In-Reply-To: <20130730135751.GD12016@htj.dyndns.org>
On Tue, Jul 30, 2013 at 09:57:51AM -0400, Tejun Heo wrote:
> Hello,
>
> On Tue, Jul 30, 2013 at 09:07:08PM +0800, Shaohua Li wrote:
> > Ok, I should explain here. I can't add a work_struct for each stripe, because
> > this will stress workqueue very hard. My system handles > 1M/s stripes, which
> > makes workqueue pool lock contended very hard.
>
> It doesn't have to be embedding work_struct in each stripe and
> schduling them altogether. It's more about scheduling "work units"
> rather than "workers" - ie. letting each scheduled work item handle
> single work unit rather than making it dispatch multiple work items.
> It may make controlling concurrency a bit more interesting but you can
> always do it with workqueue_set_max_active(), which is the intended
> usage anyway.
stripe is the work unit actually. As I said, if I queue a work for each stripe,
just queue_work() will make the system blast because of the pwq->pool->lock
contention. dispatching one work has another side effect that I can't add block
plug. Since this is the queue stage concurrency problem,
workqueue_set_max_active() doesn't help.
Thanks,
Shaohua
next prev parent reply other threads:[~2013-07-31 1:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-30 5:52 [patch 0/3] raid5: make stripe handling multi-threading shli
2013-07-30 5:52 ` [patch 1/3] raid5: offload stripe handle to workqueue shli
2013-07-30 11:46 ` Tejun Heo
2013-07-30 12:53 ` Tejun Heo
2013-07-30 13:07 ` Shaohua Li
2013-07-30 13:57 ` Tejun Heo
2013-07-31 1:24 ` Shaohua Li [this message]
2013-07-31 10:33 ` Tejun Heo
2013-08-01 2:01 ` Shaohua Li
2013-08-01 12:15 ` Tejun Heo
2013-07-30 5:52 ` [patch 2/3] raid5: sysfs entry to control worker thread number shli
2013-07-30 5:52 ` [patch 3/3] raid5: only wakeup necessary threads shli
2013-07-30 12:46 ` Tejun Heo
2013-07-30 13:24 ` Shaohua Li
2013-07-30 14:01 ` Tejun Heo
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=20130731012434.GA1504@kernel.org \
--to=shli@kernel.org \
--cc=djbw@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
--cc=tj@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.