Re: [PATCH bpf-next 0/6] workqueue: introduce BPF iterators for workqueues, worker pools and pending work
Tejun Heo <[email protected]> Sat, 1 Aug 2026 16:59:01 -1000
| Newsgroups | org.kernel.vger.bpf |
|---|---|
| Message-ID | <[email protected]> |
Hello, On Tue, Jul 28, 2026 at 02:55:19PM +0800, Imran Khan wrote: > Nearly every subsystem defers work to workqueues, and their state can > already be observed on a live system, just not at a granularity that is > convenient to consume. sysrq dumps every workqueue and pool to the kernel > log in a fixed format, with no way to select or aggregate; the WQ_SYSFS > interface only covers workqueues that ask for it and exposes attributes > rather than runtime state; and the drgn scripts under tools/workqueue/ need > a debuginfo-equipped userspace and read the state from the outside, without > the locks that protect it. > > This series adds BPF iterators for workqueues, worker pools and pending > work items, so that this state can be walked from inside the kernel, under > the right locking, with filtering and aggregation done in place and only > the interesting part copied to userspace. I'm not necessarily against it but what are the use cases here? If for debugging, isn't drgn + hooking into tracepoints mostly enough? Can you give concrete examples where bpf iterators are essential? Thanks. -- tejun