lkml.org 
[lkml]   [2013]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHSET wq/for-3.10] workqueue: break up workqueue_lock into multiple locks
Hey,

On Wed, Mar 20, 2013 at 11:01:50PM +0900, JoonSoo Kim wrote:
> 2013/3/19 Tejun Heo <tj@kernel.org>:
> > On Wed, Mar 13, 2013 at 07:57:18PM -0700, Tejun Heo wrote:
> >> and available in the following git branch.
> >>
> >> git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git review-finer-locking
> >
> > Applied to wq/for-3.10.
>
> Hello, Tejun.
>
> I know I am late, but, please give me a change to ask a question.
>
> Finer locking for workqueue code is really needed?
> Is there a performance issue?
> I think that there is too many locks and locking rules,
> although the description about these are very nice.

It isn't about performance. So, workqueue_lock is broken into three
locks by this series - wq_mutex, pwq_lock and mayday_lock. The
primary reason for this patchset is wq_mutex. We want to do blocking
operations while excluding workqueue and pool modifications which
isn't possible with workqueue_lock and at the same time there are
things which can't be protected by a mutex (should be a irq-safe
lock), so we need break up the lock. After breaking off wq_mutex from
workqueue_lock. Most stuff covered by workqueue_lock was pwq related
and mayday was the only one-off thing left, so one more lock there,
which I think actually make things easier to digest.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2013-03-20 16:21    [W:0.037 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site