[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whWreGjEQ6yasspzBrNnS7EQiL+SknToWt=SzUh4XomyQ@mail.gmail.com>
Date: Sun, 20 Mar 2022 09:59:52 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc: Tejun Heo <tj@...nel.org>, Lai Jiangshan <jiangshanlai@...il.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 (repost)] workqueue: Warn flushing of kernel-global workqueues
On Sat, Mar 19, 2022 at 11:06 PM Tetsuo Handa
<penguin-kernel@...ove.sakura.ne.jp> wrote:
>
> I know there are in-tree flush_scheduled_work() users.
It's not just that there are in-tree users - there are in-tree users
in CORE CODE anat pretty much everybody runs.
This is not some kind of "it's some broken rare driver that we can't
test because almost nobody has the hardware".
> This patch is intended for
>
> (a) preventing developers from adding more flush_workqueue() calls on
> kernel-global WQs.
No. We're not taking stuff like this when core code has it, and will
trigger the same warning.
A warning that nobody will look at anyway, because it's just a single
line in dmesg, and because I bet there are perfectly regular machines
that will trigger the warning with existing users.
For example, I'm looking at that acpi_release_memory() case as an
example - used by ucsi_acpi_probe. I have no idea whether UCSI is
actually all that common or not, but the Kconfig docs say
"UCSI is available on most of the new Intel based systems
that are equipped with Embedded Controller and USB Type-C ports"
which makes me think it's not exactly rare.
We're not adding warnings for alleged new uses - when that warning
would trigger on normal system,s.
> (b) serving as an anchor to be referenced from individual patches
No. You can already reference the existing comment. There's no need to
create a bad commit just to make excuses to fix things up.
> This patch avoids emitting "WARNING:" in order not to disturb kernel testing.
See above: the patch is _pointless_.
And until normal systems don't have the warning, I don't want this
kind of pointless and wrong patch.
> If you want how to convert, I can include it into patch description.
I just want the existign users converted.
Once there are no existing users, we remove the interface.
And once the regular "flush_scheduled_work()" and friends are gone,
*THEN* we can add real verification that nobody tries to flush those
system-wide workqueues.
Linus
Powered by blists - more mailing lists