public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3] workqueue: unfold start_worker() into create_worker()
Date: Tue, 22 Jul 2014 11:05:22 -0400	[thread overview]
Message-ID: <20140722150522.GD13851@htj.dyndns.org> (raw)
In-Reply-To: <1406005382-11958-1-git-send-email-laijs@cn.fujitsu.com>

On Tue, Jul 22, 2014 at 01:03:02PM +0800, Lai Jiangshan wrote:
> Simply unfold the code of start_worker() into create_worker() and
> remove the original start_worker() and create_and_start_worker().
> 
> The only trade-off is the introduced overhead that the pool->lock
> is released and regrabbed after the newly worker is started.
> The overhead is acceptible since the manager is slow path.
> 
> And because this new locking behavior, the newly created worker
> may grab the lock earlier than the manager and go to process
> work items. In this case, the recheck need_to_create_worker() may be
> true as expected and the manager goes to restart without complaint.
> 
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>

Applied to wq/for-3.17.

Thanks.

-- 
tejun

      reply	other threads:[~2014-07-22 15:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-10 16:01 [PATCH 0/3] workqueue: manager cleanup Lai Jiangshan
2014-07-10 16:01 ` [PATCH 1/3] workqueue: remove the first check and the return value of maybe_create_worker() Lai Jiangshan
2014-07-11 15:03   ` Tejun Heo
2014-07-14  2:30     ` Lai Jiangshan
2014-07-14 14:40       ` Tejun Heo
2014-07-10 16:01 ` [PATCH 2/3] workqueue: remove the guarantee and the retrying " Lai Jiangshan
2014-07-11 15:02   ` Tejun Heo
2014-07-10 16:01 ` [PATCH 3/3] workqueue: unfold start_worker() into create_worker() Lai Jiangshan
2014-07-14  4:05 ` [PATCH 0/1 V2] workqueue: manager cleanup Lai Jiangshan
2014-07-14  4:05   ` [PATCH 1/1 V2] workqueue: unfold start_worker() into create_worker() Lai Jiangshan
2014-07-16  1:28     ` Lai Jiangshan
2014-07-18 22:57       ` Tejun Heo
2014-07-22  5:03         ` [PATCH V3] " Lai Jiangshan
2014-07-22 15:05           ` 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=20140722150522.GD13851@htj.dyndns.org \
    --to=tj@kernel.org \
    --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