From: Tejun Heo <tj@kernel.org>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] workqueue: remove the empty check in too_many_workers()
Date: Thu, 19 Jun 2014 12:25:13 -0400 [thread overview]
Message-ID: <20140619162513.GJ26904@htj.dyndns.org> (raw)
In-Reply-To: <1401780727-12161-1-git-send-email-laijs@cn.fujitsu.com>
On Tue, Jun 03, 2014 at 03:32:07PM +0800, Lai Jiangshan wrote:
> The commit ea1abd6197d5 ("workqueue: reimplement idle worker rebinding")
> used a trick which simply removes all to-be-bound idle workers from the
> idle list and lets them add themselves back after completing rebinding.
>
> And this trick caused the @worker_pool->nr_idle may deviate than the actual
> number of idle workers on @worker_pool->idle_list. More specifically,
> nr_idle may be non-zero while ->idle_list is empty. All users of
> ->nr_idle and ->idle_list are audited. The only affected one is
> too_many_workers() which is updated to check %false if ->idle_list is
> empty regardless of ->nr_idle.
>
> The commit/trick was complicated due to it just tried to simplify an even
> more complicated problem (workers had to rebind itself). But the commit
> a9ab775bcadf ("workqueue: directly restore CPU affinity of workers
> from CPU_ONLINE") fixed all these problems and the mentioned trick was
> useless and is gone.
>
> So, now the @worker_pool->nr_idle is exactly the actual number of workers
> on @worker_pool->idle_list. too_many_workers() should recover as it was
> before the trick. So we remove the empty check.
>
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Applied to wq/for-3.17.
Thanks.
--
tejun
prev parent reply other threads:[~2014-06-19 16:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-03 7:32 Lai Jiangshan
2014-06-19 16:25 ` 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=20140619162513.GJ26904@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
all inboxes | Powered by JetHome®