Re: [PATCH bpf-next v5 4/8] bpf: Introduce cgroup iter
From: Tejun Heo <tj@kernel.org>
Date: 2022-07-28 17:35:22
Also in:
bpf, cgroups, lkml
From: Tejun Heo <tj@kernel.org>
Date: 2022-07-28 17:35:22
Also in:
bpf, cgroups, lkml
On Thu, Jul 28, 2022 at 10:20:46AM -0700, Hao Luo wrote: ...
is a good feature of this convention. My thoughts: It seems that ID may be better, for two reasons. First, because ID is stateless, the userspace doesn't have to remember closing the FD. Second, using different identifications in two directions (userspace specifies cgroup using FD, while kernel reports cgroup using ID) introduces a little complexity when connecting them together.
Yeah, you can pass the IDs around different processes, print and log them in meaningful ways and so on because they're actual IDs, so my preference is towards using them for anything new. Thanks. -- tejun