From: Tejun Heo <tj@kernel.org>
To: Valentin Schneider <vschneid@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Lai Jiangshan <jiangshanlai@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
Frederic Weisbecker <frederic@kernel.org>,
Juri Lelli <juri.lelli@redhat.com>, Phil Auld <pauld@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [RFC PATCH] workqueue: Unbind workers before sending them to exit()
Date: Wed, 20 Jul 2022 08:03:56 -1000 [thread overview]
Message-ID: <YthDjPq3CtWc+o0/@slm.duckdns.org> (raw)
In-Reply-To: <20220719165743.3409313-1-vschneid@redhat.com>
On Tue, Jul 19, 2022 at 05:57:43PM +0100, Valentin Schneider wrote:
> It has been reported that isolated CPUs can suffer from interference due to
> per-CPU kworkers waking up just to die.
>
> A surge of workqueue activity (sleeping workfn's exacerbate this) during
> initial setup can cause extra per-CPU kworkers to be spawned. Then, a
> latency-sensitive task can be running merrily on an isolated CPU only to be
> interrupted sometime later by a kworker marked for death (cf.
> IDLE_WORKER_TIMEOUT, 5 minutes after last kworker activity).
>
> Affine kworkers to the wq_unbound_cpumask (which doesn't contain isolated
> CPUs, cf. HK_TYPE_WQ) before waking them up after marking them with
> WORKER_DIE.
>
> This follows the logic of CPU hot-unplug, which has been packaged into
> helpers for the occasion.
Idea-wise, seems fine to me, but we have some other issues around twiddling
cpu affinities right now, so let's wait a bit till Lai chimes in.
Thanks.
--
tejun
next prev parent reply other threads:[~2022-07-20 18:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 16:57 [RFC PATCH] workqueue: Unbind workers before sending them to exit() Valentin Schneider
2022-07-20 17:54 ` Marcelo Tosatti
2022-07-20 18:03 ` Tejun Heo [this message]
2022-07-21 3:35 ` Lai Jiangshan
2022-07-21 13:53 ` Valentin Schneider
2022-07-23 5:16 ` Tejun Heo
2022-07-25 10:21 ` Valentin Schneider
2022-07-26 17:30 ` Tejun Heo
2022-07-26 20:36 ` Valentin Schneider
2022-07-26 22:59 ` Tejun Heo
2022-07-27 5:38 ` Lai Jiangshan
2022-07-27 6:30 ` Lai Jiangshan
2022-07-27 8:55 ` Lai Jiangshan
2022-07-27 9:22 ` Valentin Schneider
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=YthDjPq3CtWc+o0/@slm.duckdns.org \
--to=tj@kernel.org \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pauld@redhat.com \
--cc=peterz@infradead.org \
--cc=vschneid@redhat.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).