Thread (30 messages) 30 messages, 3 authors, 2022-05-13

Re: [RFC PATCH bpf-next 8/9] bpf: Introduce cgroup iter

From: Tejun Heo <tj@kernel.org>
Date: 2022-05-10 22:07:55
Also in: bpf, cgroups, lkml

Hello,

On Tue, May 10, 2022 at 02:12:16PM -0700, Hao Luo wrote:
quoted
Is there a reason why this can't be a proper iterator which supports
lseek64() to locate a specific cgroup?
There are two reasons:

- Bpf_iter assumes no_llseek. I haven't looked closely on why this is
so and whether we can add its support.

- Second, the name 'iter' in this patch is misleading. What this patch
really does is reusing the functionality of dumping in bpf_iter.
'Dumper' is a better name. We want to create one file in bpffs for
each cgroup. We are essentially just iterating a set of one single
element.
I see. I'm just shooting in the dark without context but at least in
principle there's no reason why cgroups wouldn't be iterable, so it might be
something worth at least thinking about before baking in the interface.

Thanks.

-- 
tejun
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help