cgroup_is_descendant(9)
π cgroup_is_descendant(9)
okay so this is a page from the Kernel API Manual bestie, and it's about the function cgroup_is_descendant β literally the "are we related" vibe check for cgroups πΈ
β¨ NAME β¨
cgroup_is_descendant β test ancestry π (yes, we're doing a whole family tree moment)
β¨ SYNOPSIS β¨
bool cgroup_is_descendant (struct cgroup *cgrp , struct cgroup *ancestor );
π ARGUMENTS π
cgrpβ the cgroup to be tested. this is the one putting itself out there, like "hi am i in this family" πancestorβ possible ancestor ofcgrp. the maybe-parent, the potential ancestor, the one we're checking against π«
π¦ DESCRIPTION π¦
so the whole thing: it tests whether cgrp is a descendant of ancestor. that's it, that's the function, and it ate π
and listen β it also returns true if cgrp == ancestor. so if you're checking yourself against yourself, you're your own ancestor, iconic behavior honestly. self-love fr fr π
ngl this function is safe to call as long ascgrpandancestorare accessible. that's the whole caveat. keep them accessible and you're golden β¨
π SEE ALSO π
bestie there are SO many siblings, this function has main character energy with this many cross-references π
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_ancestor(9)cgroup_common_ancestor(9)task_under_cgroup_hierarchy(9)
like every single one of those is linked, go read them, i'm obsessed π«Ά
and that's the page!! it lives in ./include/linux (the section for these kernel API pages, iykyk) and it's dated October 2026 β so yeah, that's the whole thing, you understood it perfectly, slay π§π
π¦ 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