task_under_cgroup_hierarchy(9)
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 oftask'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 π
cgroup_subsys_enabled(9)cgroup_subsys_on_dfl(9)css_for_each_child(9)css_for_each_descendant_pre(9)css_for_each_descendant_post(9)cgroup_taskset_for_each(9)cgroup_taskset_for_each_leader(9)cgroup_css(9)css_is_dying(9)task_css_set_check(9)task_css_check(9)task_css_set(9)task_css(9)task_get_css(9)task_css_is_root(9)cgroup_is_descendant(9)cgroup_ancestor(9)cgroup_common_ancestor(9)
xoxo from ./include/linux, October 2026 β task_under_cgroup_hierarchy(9) out π
π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms