lkml.org 
[lkml]   [2013]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/3] raid5: offload stripe handle to workqueue
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


\
 
 \ /
  Last update: 2013-08-01 14:41    [W:0.065 / U:1.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site