Re: [PATCH] workqueue: Avoid noise generated by real-time tasks
From: Tejun Heo
Date: Thu Nov 26 2026 - 05:57:44 EST
On Thu, Nov 26, 2026 at 06:25:30PM +0800, Edward Adam Davis wrote:
> A user creates a SCHED_FIFO real-time thread and pins it to CPU0, and arm
> watchdog timer on CPU1 with 3s threshold. The real-time thread runs for an
> extended period without voluntarily yielding the CPU, preventing standard
> kworker threads on CPU0 from gaining access to the processor.
>
> As a result, certain kernel works cannot be executed in a timely manner,
> which may even trigger a watchdog report:
>
> BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 5s!
> Showing busy workqueues and worker pools:
> workqueue mm_percpu_wq: flags=0x108
> pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=1 refcnt=2
> pending: vmstat_update
>
> To address this, a check for CPU-bound tasks has been added to the work
> pool; this helps prevent false-positive reports caused by prolonged CPU
> occupancy by real-time tasks.
Workqueue did lock up tho? This is one of the conditions that the mechanism
is intended to warn about.
--
tejun