linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Valentin Schneider <valentin.schneider@arm.com>,
	Peter Zijlstra <peterz@infradead.org>, Qian Cai <cai@redhat.com>,
	Vincent Donnefort <vincent.donnefort@arm.com>,
	"Paul E . McKenney" <paulmck@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Lai Jiangshan <laijs@linux.alibaba.com>
Subject: Re: [PATCH] workqueue: keep unbound rescuer's cpumask to be default cpumask
Date: Tue, 19 Jan 2021 11:02:18 -0500	[thread overview]
Message-ID: <YAcCivvOTpgWsie+@mtj.duckdns.org> (raw)
In-Reply-To: <20210116065753.2163-1-jiangshanlai@gmail.com>

On Sat, Jan 16, 2021 at 02:57:53PM +0800, Lai Jiangshan wrote:
> From: Lai Jiangshan <laijs@linux.alibaba.com>
> 
> When we attach a rescuer to a pool, we will set the rescuer's cpumask
> to the pool's cpumask.  If there is hotplug ongoing, it may cause
> the rescuer running on the dying CPU and cause bug or it may cause
> warning of setting online&!active cpumask.
> 
> So we have to find a reliable way to set cpumask when attaching
> rescuer.
> 
> When the pool is percpu pool, we have easy way to reliably
> set cpumask with the help of %POOL_DISASSOCIATED.
> 
> But when it is unbound rescuer, the problem becomes harder, because
> we can't neither use get_online_cpus() here nor test cpu_active_mask
> without synchronization.
> 
> Atfer investigation, and noticing the unbound nature of the unbound
> rescuer, we decide to make it use the wq's default pwq's cpumask so
> that we don't need to set the rescuer's cpumask when attaching.
> 
> To implement it, we have to set unbound rescuer's cpumask to the
> default pwq's cpumask when creation and maintain it when hotplug
> or the default pwq is changed.

Yeah, this approach makes sense to me. It doesn't look like all problems are
resolved but for the rescuer behavior part, please feel free to add

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun

  reply	other threads:[~2021-01-19 16:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-16  6:57 [PATCH] workqueue: keep unbound rescuer's cpumask to be default cpumask Lai Jiangshan
2021-01-19 16:02 ` Tejun Heo [this message]
2021-01-26  7:19 ` [workqueue] a1438771e1: WARNING:at_kernel/workqueue.c:#workqueue_online_cpu kernel test robot

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=YAcCivvOTpgWsie+@mtj.duckdns.org \
    --to=tj@kernel.org \
    --cc=cai@redhat.com \
    --cc=jiangshanlai@gmail.com \
    --cc=laijs@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=valentin.schneider@arm.com \
    --cc=vincent.donnefort@arm.com \
    /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;
as well as URLs for NNTP newsgroup(s).