Re: [PATCH] KEYS: dispatch key_gc_work to system_wq.
From: Jarkko Sakkinen
Date: Mon Oct 26 2026 - 18:01:01 EST
On Mon, Oct 26, 2026 at 05:12:18AM +0200, Jarkko Sakkinen wrote:
> schedule_work() dispatches key_gc_work on the per-CPU system_wq, which can
> choke the queue:
>
> BUG: workqueue lockup - pool cpus=0 node=0 flags=0x2 nice=0 stuck for 30s!
>
> Queue the work on system_dfl_long_wq instead, which is an unbounded wq for
> long-running tasks i.e., it has the WQ_BOUND flag set and thus cannot hog
> the CPU core.
>
> Link: https://lore.kernel.org/keyrings/20261024042944.52493-1-hackerowskiy@xxxxxxxxx/
> Reported-by: syzbot+c15de43f1e7fffbb7b9b@xxxxxxxxxxxxxxxxxxxxxxxxx
> Closes: https://lore.kernel.org/all/6ad35b60.7952420f.283480.0360.GAE@xxxxxxxxxx/T/
> Signed-off-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>
> ---
> I sanity checked with perf that scheduler latency improved clearly as it
> should, and used large keyrings that I expired, as the test payload.
Based on the feedback, rather than arguing about irrelevant stuff, I'll
focus on formalizing AB test for this.
I have couple of additional ideas to try out but without AB test fixing
this is really just shooting in the wind.
Br, Jarkko