[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZeDrCMLlzVZpvbrG@slm.duckdns.org>
Date: Thu, 29 Feb 2024 10:37:28 -1000
From: Tejun Heo <tj@...nel.org>
To: Boqun Feng <boqun.feng@...il.com>
Cc: torvalds@...ux-foundation.org, mpatocka@...hat.com,
linux-kernel@...r.kernel.org, dm-devel@...ts.linux.dev,
msnitzer@...hat.com, ignat@...udflare.com, damien.lemoal@....com,
bob.liu@...cle.com, houtao1@...wei.com, peterz@...radead.org,
mingo@...nel.org, netdev@...r.kernel.org, allen.lkml@...il.com,
kernel-team@...a.com, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH for-6.9] workqueue: Drain BH work items on hot-unplugged
CPUs
On Mon, Feb 26, 2024 at 03:38:55PM -1000, Tejun Heo wrote:
> Boqun pointed out that workqueues aren't handling BH work items on offlined
> CPUs. Unlike tasklet which transfers out the pending tasks from
> CPUHP_SOFTIRQ_DEAD, BH workqueue would just leave them pending which is
> problematic. Note that this behavior is specific to BH workqueues as the
> non-BH per-CPU workers just become unbound when the CPU goes offline.
>
> This patch fixes the issue by draining the pending BH work items from an
> offlined CPU from CPUHP_SOFTIRQ_DEAD. Because work items carry more context,
> it's not as easy to transfer the pending work items from one pool to
> another. Instead, run BH work items which execute the offlined pools on an
> online CPU.
>
> Note that this assumes that no further BH work items will be queued on the
> offlined CPUs. This assumption is shared with tasklet and should be fine for
> conversions. However, this issue also exists for per-CPU workqueues which
> will just keep executing work items queued after CPU offline on unbound
> workers and workqueue should reject per-CPU and BH work items queued on
> offline CPUs. This will be addressed separately later.
>
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Reported-by: Boqun Feng <boqun.feng@...il.com>
> Link: http://lkml.kernel.org/r/Zdvw0HdSXcU3JZ4g@boqun-archlinux
Applying this to wq/for-6.9.
Thanks.
--
tejun
Powered by blists - more mailing lists