[lkml]   [2022]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3 (repost)] workqueue: Warn flushing of kernel-global workqueues
On Sat, Mar 19, 2022 at 11:06 PM Tetsuo Handa
<> 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.


 \ /
  Last update: 2022-03-20 18:00    [W:0.144 / U:1.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site