Re: [PATCH] workqueue: Avoid noise generated by real-time tasks
From: Edward Adam Davis
Date: Fri Nov 27 2026 - 00:07:46 EST
From: Edward Aadm Davis <eadavis@xxxxxxxx>
On Thu, 26 Nov 2026 00:57:38 -1000, Tejun Heo 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.
For userspace realtime tasks, the mechanism same?
BR,
Edward