dmem_cgroup...mon_ancestor(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 says dm_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