From: Tejun Heo <tj@kernel.org>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] workqueue: remove get_online_cpus() from apply_workqueue_attrs()
Date: Mon, 27 Oct 2014 09:41:20 -0400 [thread overview]
Message-ID: <20141027134120.GF4436@htj.dyndns.org> (raw)
In-Reply-To: <1412740423-20782-4-git-send-email-laijs@cn.fujitsu.com>
On Wed, Oct 08, 2014 at 11:53:33AM +0800, Lai Jiangshan wrote:
> There are two aims for get_online_cpus():
> 1) Protects cpumask_of_node(node). (CPUs should stay stable)
> 2) Protects the pwq-allocation and installation
>
> But both aims are settled by other methods in previous patches:
> cpumask_of_node(node) is replaced by wq_unbound_online_cpumask, and
> the pwq-allocation and installation are changed to be protected by
> wq_pool_mutex. Now the get_online_cpus() is no reason to exist,
> remove it!
>
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Well, this is very marginal and we want to add comments explaining why
this is safe, but yeah I guess it's an improvement. Can you please
add comments explaining what states are depended upon and that they
are all protected by pool mutex?
Thanks.
--
tejun
next prev parent reply other threads:[~2014-10-27 13:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 3:53 [PATCH 0/3] workqueue: unbound workqueue management Vs hotplug Lai Jiangshan
2014-10-08 3:53 ` [PATCH 1/3] workqueue: add wq_unbound_online_cpumask Lai Jiangshan
2014-10-27 13:15 ` Tejun Heo
2014-10-08 3:53 ` [PATCH 2/3] workqueue: extend wq_pool_mutex to also protect pwq-installation Lai Jiangshan
2014-10-27 13:20 ` Tejun Heo
2014-10-08 3:53 ` [PATCH 3/3] workqueue: remove get_online_cpus() from apply_workqueue_attrs() Lai Jiangshan
2014-10-27 13:41 ` Tejun Heo [this message]
2014-10-27 9:27 ` [PATCH 0/3] workqueue: unbound workqueue management Vs hotplug Lai Jiangshan
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=20141027134120.GF4436@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®