Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

workqueue: Rename show_cpu_pool{s,}_hog{s,}() to reflect broadened scope

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>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Breno Leitao and committed by
Tejun Heo
98c790b1 9e83d510

+5 -5
+5 -5
kernel/workqueue.c
··· 7587 7587 * wait_event_idle() with PF_WQ_WORKER cleared) can stall the pool just as 7588 7588 * effectively as a CPU-bound one, so dump every in-flight worker. 7589 7589 */ 7590 - static void show_cpu_pool_hog(struct worker_pool *pool) 7590 + static void show_cpu_pool_busy_workers(struct worker_pool *pool) 7591 7591 { 7592 7592 struct worker *worker; 7593 7593 unsigned long irq_flags; ··· 7612 7612 raw_spin_unlock_irqrestore(&pool->lock, irq_flags); 7613 7613 } 7614 7614 7615 - static void show_cpu_pools_hogs(void) 7615 + static void show_cpu_pools_busy_workers(void) 7616 7616 { 7617 7617 struct worker_pool *pool; 7618 7618 int pi; 7619 7619 7620 - pr_info("Showing backtraces of busy workers in stalled CPU-bound worker pools:\n"); 7620 + pr_info("Showing backtraces of busy workers in stalled worker pools:\n"); 7621 7621 7622 7622 rcu_read_lock(); 7623 7623 7624 7624 for_each_pool(pool, pi) { 7625 7625 if (pool->cpu_stall) 7626 - show_cpu_pool_hog(pool); 7626 + show_cpu_pool_busy_workers(pool); 7627 7627 7628 7628 } 7629 7629 ··· 7720 7720 show_all_workqueues(); 7721 7721 7722 7722 if (cpu_pool_stall) 7723 - show_cpu_pools_hogs(); 7723 + show_cpu_pools_busy_workers(); 7724 7724 7725 7725 if (lockup_detected) 7726 7726 panic_on_wq_watchdog(max_stall_time);