workqueue: Changes for v6.20

- Rework the rescuer to process work items one-by-one instead of
  slurping all pending work items in a single pass. As there is only
  one rescuer per workqueue, a single long-blocking work item could
  cause high latency for all tasks queued behind it, even after memory
  pressure is relieved and regular kworkers become available to service
  them.

- Add CONFIG_BOOTPARAM_WQ_STALL_PANIC build-time option and
  workqueue.panic_on_stall_time parameter for time-based stall panic,
  giving systems more control over workqueue stall handling.

- Replace BUG_ON() with panic() in the stall panic path for clearer
  intent and more informative output.
workqueue: replace BUG_ON with panic in panic_on_wq_watchdog

Replace BUG_ON() with panic() in panic_on_wq_watchdog(). This is not
a bug condition but a deliberate forced panic requested by the user
via module parameters to crash the system for debugging purposes.

Using panic() instead of BUG_ON() makes this intent clearer and provides
more informative output about which threshold was exceeded and the actual
values, making it easier to diagnose the stall condition from crash dumps.

Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
1 file changed