linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Shaohua Li <shli@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: Thu, 1 Aug 2013 08:15:01 -0400	[thread overview]
Message-ID: <20130801121501.GB24966@htj.dyndns.org> (raw)
In-Reply-To: <20130801020101.GB12580@kernel.org>

Hello,

On Thu, Aug 01, 2013 at 10:01:01AM +0800, Shaohua Li wrote:
> It does have lock, but when a stripe is queued to handle, no lock is required.

Hmmmm.... sorry but can you please explain it a bit further?  Why
wouldn't it require a lock?  Perhaps because it has to be on some
queue already?

> So the workqueue lock will be high contended.

I still don't follow how it'd be more contended than the presumably
single lock that you'd have to use for queueing.

> > Also, can you please
> > elaborate the block plug part?
> 
> Basically I do:
> 
> blk_start_plug()
> handle_stripe() //may dispatch request
> blk_end_plug()
> 
> If only handle one stripe between block plug, the plug is useless, so I need
> handle several stripes.

Ah, right, plugging is tied to the current context, so yeap that makes
sense.

The only thing which may actually matter is freezer handling as direct
freezer handling tends to be pretty tricky.  If the work item
processing doesn't need freezing (which should be the case, I think),
it's all good.  If it does, it'd probably be best to make the
workqueue freezable and breakout of the loop if freezing.

Thanks.

-- 
tejun

  reply	other threads:[~2013-08-01 12:15 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
2013-07-31 10:33           ` Tejun Heo
2013-08-01  2:01             ` Shaohua Li
2013-08-01 12:15               ` Tejun Heo [this message]
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=20130801121501.GB24966@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=djbw@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=shli@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).