task_under_cgroup_hierarchy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the task_under_cgroup_hierarchy(9) page from the Kernel API Manual ✨ it’s literally the cgroup-ancestry membership check and it’s giving kernel-internals realness πŸ’…

πŸ’– NAME πŸ’–

  • task_under_cgroup_hierarchy β€” test task's membership of cgroup ancestry. periodt. 🫢

✨ SYNOPSIS ✨

okay so the signature is exactly this, no edits, no cap:

bool task_under_cgroup_hierarchy (struct task_struct *task , struct
       cgroup *ancestor );

πŸŽ€ ARGUMENTS πŸŽ€

  • task β€” the task to be tested, bestie 🧚
  • ancestor β€” possible ancestor of task's cgroup πŸ‘‘

🌸 DESCRIPTION 🌸

So here’s the tea: this function tests whether task's default cgroup hierarchy is a descendant of ancestor. It follows all the same rules as cgroup_is_descendant, and it only applies to the default hierarchy. No cap, that’s the whole vibe. πŸ’–

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file: ./include/linux/cgroup.h πŸ“

xoxo from ./include/linux, October 2026 β€” task_under_cgroup_hierarchy(9) out πŸ’…πŸŽ€

πŸ“¦ where this page comes from