From: Tejun Heo <tj@kernel.org>
To: Aaron Tomlin <atomlin@atomlin.com>
Cc: leitao@debian.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] tools/workqueue/wq_dump.py: Add busy worker inspection and BH pool states
Date: Wed, 30 Sep 2026 07:35:17 -1000 [thread overview]
Message-ID: <39d267b537b00b0b04a4a1999cb498a0@kernel.org> (raw)
In-Reply-To: <20260930143958.252572-1-atomlin@atomlin.com>
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
prev parent reply other threads:[~2026-09-30 17:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 14:39 Aaron Tomlin
2026-09-30 17:35 ` Tejun Heo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39d267b537b00b0b04a4a1999cb498a0@kernel.org \
--to=tj@kernel.org \
--cc=atomlin@atomlin.com \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®