Re: [PATCH 1/2] block: add BPF kfuncs to read blkcg io.stat

Shakeel Butt <[email protected]>
Newsgroups org.kernel.vger.linux-block,org.kernel.vger.bpf,org.kernel.vger.cgroups,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest
Message-ID <[email protected]>
On Mon, Aug 10, 2026 at 10:00:55AM -1000, Tejun Heo wrote:
> Hello,
> 
> On Fri, Aug 07, 2026 at 12:37:31PM -0700, Ziyang Men wrote:
> > +__bpf_kfunc struct blkcg *bpf_get_root_blkcg(void)
> > +__bpf_kfunc struct blkcg *bpf_get_blkcg(struct cgroup_subsys_state *css)
> > +__bpf_kfunc void bpf_put_blkcg(struct blkcg *blkcg)
> > +__bpf_kfunc void bpf_blkcg_flush_stats(struct blkcg *blkcg)
> 
> I wonder whether making the above deal with css's would make more sense so
> that we don't end up with per-subsystem iterators. If casting to per-subsys
> type is necessary, we can provide RCU protected cast kfucns.
> 

Hi Tejun, (sorry for asking dumb questions) is the concern you have is that with
the current approach, we will have get_root/get/put kfuncs for each subsystem or
something else? Also how will the current approach leads to per-subsystem
iterators?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.