public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] workqueue: Rename show_cpu_pool{s,}_hog{s,}() to reflect broadened scope
@ 2026-03-06 10:46 Breno Leitao
  2026-03-06 16:40 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Breno Leitao @ 2026-03-06 10:46 UTC (permalink / raw)
  To: Tejun Heo, Lai Jiangshan
  Cc: Song Liu, linux-kernel, kernel-team, Breno Leitao

show_cpu_pool_hog() and show_cpu_pools_hogs() no longer only dump CPU
hogs — since commit 8823eaef45da ("workqueue: Show all busy workers in
stall diagnostics"), they dump every in-flight worker in the pool's
busy_hash.

Rename them to show_cpu_pool_busy_workers() and
show_cpu_pools_busy_workers() to accurately describe what they do.

Also fix the pr_info() message to say "stalled worker pools" instead of
"stalled CPU-bound worker pools", since sleeping/blocked workers are now
included.

No functional change.

Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Breno Leitao <leitao@debian.org>
---
 kernel/workqueue.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 09b9ad78d566c..b77119d71641a 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -7587,7 +7587,7 @@ MODULE_PARM_DESC(panic_on_stall_time, "Panic if stall exceeds this many seconds
  * wait_event_idle() with PF_WQ_WORKER cleared) can stall the pool just as
  * effectively as a CPU-bound one, so dump every in-flight worker.
  */
-static void show_cpu_pool_hog(struct worker_pool *pool)
+static void show_cpu_pool_busy_workers(struct worker_pool *pool)
 {
 	struct worker *worker;
 	unsigned long irq_flags;
@@ -7612,18 +7612,18 @@ static void show_cpu_pool_hog(struct worker_pool *pool)
 	raw_spin_unlock_irqrestore(&pool->lock, irq_flags);
 }
 
-static void show_cpu_pools_hogs(void)
+static void show_cpu_pools_busy_workers(void)
 {
 	struct worker_pool *pool;
 	int pi;
 
-	pr_info("Showing backtraces of busy workers in stalled CPU-bound worker pools:\n");
+	pr_info("Showing backtraces of busy workers in stalled worker pools:\n");
 
 	rcu_read_lock();
 
 	for_each_pool(pool, pi) {
 		if (pool->cpu_stall)
-			show_cpu_pool_hog(pool);
+			show_cpu_pool_busy_workers(pool);
 
 	}
 
@@ -7720,7 +7720,7 @@ static void wq_watchdog_timer_fn(struct timer_list *unused)
 		show_all_workqueues();
 
 	if (cpu_pool_stall)
-		show_cpu_pools_hogs();
+		show_cpu_pools_busy_workers();
 
 	if (lockup_detected)
 		panic_on_wq_watchdog(max_stall_time);

---
base-commit: 9e83d5104a70d8545bad61a77e166190d9447e1d
change-id: 20260306-wq_rename-6494080fb54c

Best regards,
--  
Breno Leitao <leitao@debian.org>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] workqueue: Rename show_cpu_pool{s,}_hog{s,}() to reflect broadened scope
  2026-03-06 10:46 [PATCH] workqueue: Rename show_cpu_pool{s,}_hog{s,}() to reflect broadened scope Breno Leitao
@ 2026-03-06 16:40 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2026-03-06 16:40 UTC (permalink / raw)
  To: Breno Leitao; +Cc: Lai Jiangshan, Song Liu, linux-kernel, kernel-team

Applied to wq/for-7.0-fixes.

Thanks.

--
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-06 16:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06 10:46 [PATCH] workqueue: Rename show_cpu_pool{s,}_hog{s,}() to reflect broadened scope Breno Leitao
2026-03-06 16:40 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox