On Fri, Mar 13, 2026 at 12:40:01PM +0100, Natalie Vock <[email protected]> 
wrote:
> This helps to find a common subtree of two resources, which is important
> when determining whether it's helpful to evict one resource in favor of
> another.
> 
> To facilitate this, add a common helper to find the ancestor of two
> cgroups using each cgroup's ancestor array.
> 
> Signed-off-by: Natalie Vock <[email protected]>
> ---
>  include/linux/cgroup.h      | 21 +++++++++++++++++++++
>  include/linux/cgroup_dmem.h |  9 +++++++++
>  kernel/cgroup/dmem.c        | 28 ++++++++++++++++++++++++++++
>  3 files changed, 58 insertions(+)

When the helper is added, the idiom in
kernel/cgroup/cgroup.c:cgroup_procs_write_permission() could perhaps be
switched to it too (structured in commits) to "optimize" migrations from
large depths.

Thanks,
Michal

Attachment: signature.asc
Description: PGP signature

Reply via email to