On Tue, Jul 19, 2022 at 12:16 PM Tejun Heo <tj@xxxxxxxxxx> wrote: > > Hello, > > On Tue, Jul 19, 2022 at 11:46:41AM -0700, Mina Almasry wrote: > > An interface like cgroup.sticky.[bpf/tmpfs/..] would work for us > > similar to tmpfs memcg= mount option. I would maybe rename it to > > cgroup.charge_for.[bpf/tmpfs/etc] or something. > > So, I'm not a fan because having this in cgroupfs would create the > expectation that these resources can be moved across cgroups dynamically > (and that's the only way the interface can be useful, right?). I'd much Is there a reason why these resources cannot be moved across cgroups dynamically? The only scenario I imagine is if you already have tmpfs mounted and files charged to different cgroups, but once you attribute tmpfs to one cgroup.charge_for.tmpfs (or sticky,..), I assume that we can dynamically move the resources, right? In fact, is there a reason why we can't move the tmpfs charges in that scenario as well? When we move processes we loop their pages tables and move pages and their stats, is there a reason why we wouldn't be able to do this with tmpfs mounts or bpf maps as well? > prefer something a lot more minimal - e.g. temporarily allow assuming an > ancestor identity while creating a resource or sth along that line, and to > add something like that, I think we need pretty strong arguments for why it > can't be handled through cgroup layering in userspace. > > Thanks. > > -- > tejun