Skip to content

Commit 98c790b

Browse files
leitaohtejun
authored andcommitted
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 8823eae ("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 <[email protected]> Signed-off-by: Breno Leitao <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent 9e83d51 commit 98c790b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

kernel/workqueue.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7587,7 +7587,7 @@ MODULE_PARM_DESC(panic_on_stall_time, "Panic if stall exceeds this many seconds
75877587
* wait_event_idle() with PF_WQ_WORKER cleared) can stall the pool just as
75887588
* effectively as a CPU-bound one, so dump every in-flight worker.
75897589
*/
7590-
static void show_cpu_pool_hog(struct worker_pool *pool)
7590+
static void show_cpu_pool_busy_workers(struct worker_pool *pool)
75917591
{
75927592
struct worker *worker;
75937593
unsigned long irq_flags;
@@ -7612,18 +7612,18 @@ static void show_cpu_pool_hog(struct worker_pool *pool)
76127612
raw_spin_unlock_irqrestore(&pool->lock, irq_flags);
76137613
}
76147614

7615-
static void show_cpu_pools_hogs(void)
7615+
static void show_cpu_pools_busy_workers(void)
76167616
{
76177617
struct worker_pool *pool;
76187618
int pi;
76197619

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");
76217621

76227622
rcu_read_lock();
76237623

76247624
for_each_pool(pool, pi) {
76257625
if (pool->cpu_stall)
7626-
show_cpu_pool_hog(pool);
7626+
show_cpu_pool_busy_workers(pool);
76277627

76287628
}
76297629

@@ -7720,7 +7720,7 @@ static void wq_watchdog_timer_fn(struct timer_list *unused)
77207720
show_all_workqueues();
77217721

77227722
if (cpu_pool_stall)
7723-
show_cpu_pools_hogs();
7723+
show_cpu_pools_busy_workers();
77247724

77257725
if (lockup_detected)
77267726
panic_on_wq_watchdog(max_stall_time);

0 commit comments

Comments
 (0)