Re: [PATCH v4] tools/workqueue/wq_dump.py: Add busy worker inspection and BH pool states
From: Tejun Heo
Date: Wed Sep 30 2026 - 14:35:55 EST
Hello, Aaron.
On Wed, Sep 30, 2026 at 10:39:58AM -0400, Aaron Tomlin wrote:
> + flags pool flags (bh, draining, disassociated)
bh-hi is missing. Also, the pool line already has a numeric flags=0x..
field, so using the same label for these is a bit confusing.
> + bh_type = 'bh-hi' if pool.attrs.nice == HIGHPRI_NICE_LEVEL else 'bh'
The busy worker loop computes this again. Maybe compute it once per pool
and reuse it there?
> + for bkt in pool.busy_hash:
> + if incomplete:
> + break
After the first bad bucket, this and the break in the except below skip
the rest of the pool. Maybe move on to the next bucket instead? The
warning still gets printed and the busy workers in the other buckets
aren't lost.
> + elif worker.task.value_():
...
> + else:
> + w_id = f'worker[{worker.id.value_()}]'
Only BH workers have NULL ->task and they take the POOL_BH branch, so this
can't be reached. Can we drop it?
Thanks.
--
tejun