public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: JoonSoo Kim <js1304@gmail.com>
Cc: linux-kernel@vger.kernel.org, laijs@cn.fujitsu.com
Subject: Re: [PATCHSET wq/for-3.10] workqueue: break up workqueue_lock into multiple locks
Date: Wed, 20 Mar 2013 07:38:32 -0700	[thread overview]
Message-ID: <20130320143832.GT3042@htj.dyndns.org> (raw)
In-Reply-To: <CAAmzW4N=t=aB194E-B185x1gqTJqNK4XO_diiaJrhjx+CN-_VA@mail.gmail.com>

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

      reply	other threads:[~2013-03-20 14:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-14  2:57 [PATCHSET wq/for-3.10] workqueue: break up workqueue_lock into multiple locks Tejun Heo
2013-03-14  2:57 ` [PATCH 1/7] workqueue: rename worker_pool->assoc_mutex to ->manager_mutex Tejun Heo
2013-03-14 16:00   ` Lai Jiangshan
2013-03-14 16:41     ` Tejun Heo
2013-03-14  2:57 ` [PATCH 2/7] workqueue: factor out initial worker creation into create_and_start_worker() Tejun Heo
2013-03-14  2:57 ` [PATCH 3/7] workqueue: better define locking rules around worker creation / destruction Tejun Heo
2013-03-14  2:57 ` [PATCH 4/7] workqueue: relocate global variable defs and function decls in workqueue.c Tejun Heo
2013-03-14  2:57 ` [PATCH 5/7] workqueue: separate out pool and workqueue locking into wq_mutex Tejun Heo
2013-03-14  2:57 ` [PATCH 6/7] workqueue: separate out pool_workqueue locking into pwq_lock Tejun Heo
2013-03-14  2:57 ` [PATCH 7/7] workqueue: rename workqueue_lock to wq_mayday_lock Tejun Heo
2013-03-18 19:51 ` [PATCHSET wq/for-3.10] workqueue: break up workqueue_lock into multiple locks Tejun Heo
2013-03-20 14:01   ` JoonSoo Kim
2013-03-20 14:38     ` Tejun Heo [this message]

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=20130320143832.GT3042@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=js1304@gmail.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@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