dmem_cgroup...mon_ancestor(9)
β¨ dmem_cgroup_get_common_ancestor(9) β¨
okay so bestie, we're in the Kernel API Manual today and this one is literally about finding family π no cap, it's a whole ancestry.com situation but for cgroup pools π§¬
πΈ NAME πΈ
dmem_cgroup_get_common_ancestor β find the first common ancestor of two pools π«Ά
π SYNOPSIS π
struct dmem_cgroup_pool_state * dmem_cgroup_get_common_ancestor (struct
dmem_cgroup_pool_state *a , struct dmem_cgroup_pool_state *b );
like, you hand it two pools and it goes "hmm who's your shared parent bestie" π
π¦ ARGUMENTS π¦
aβ first pool to find the common ancestor of β¨bβ first pool to find the common ancestor of.
not me noticing they literally wrote "first" for both π but that is exactly what the page says, so I'm keeping it, iykyk π think of b as the other pool you're comparing π
π₯ RETURN π₯
The first pool that is a parent of both a and b π β or NULL if either a or b are NULL, or if such a pool just... doesn't exist π (some pools are orphans, it's giving tragic).
π¨ okay listen, this part matters fr fr: a reference to the returned pool is grabbed and it must be released by the caller when it's done using the pool. don't just vibe with it forever, that's a leak and we do NOT stan leaks π release it, periodt π«Ά
π SEE ALSO π
Kernel file ./kernel/cgroup/dmem.c β plus the whole squad, go read these too bestie:
dm_cgroup_state_evict_valuable(9)β wait, the page saysdm_cgroup_state_evict_valuable(9), keep it exactly as written βdm_cgroup_unregister_region(9)dm_cgroup_register_region(9)dm_cgroup_pool_state_put(9)dm_cgroup_uncharge(9)dm_cgroup_try_charge(9)dm_cgroup_below_min(9)dm_cgroup_below_low(9)
πΈ π π§ and that's the whole page, bestie β this one lives in ./kernel/cgroup, version vibes from October 2026, mwah π
β¨ go grab that reference and put it back π«Άπ
π¦ 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