bpf_get_root_mem_cgroup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to bpf_get_root_mem_cgroup(9) β€” it's chillin' in the Kernel API Manual and it's literally about the root memory cgroup. no cap, the vibes are immaculate ✨


🌸 NAME 🌸

bpf_get_root_mem_cgroup β€” Returns a pointer to the root memory cgroup. that's the whole assignment, and it ate πŸ’…


✨ SYNOPSIS ✨

the whole vibe is:

__bpf_kfunc struct mem_cgroup * bpf_get_root_mem_cgroup (void );

πŸŽ€ ARGUMENTS πŸŽ€

  • void β€” no arguments. not a single one. it's giving minimalism, and honestly? iconic 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

so the function has KF_ACQUIRE semantics, even though the root memory cgroup is never destroyed after being created and doesn't require reference counting. like, it's built different and it stays alive forever, periodt πŸ‘‘

and it's perfectly safe to pass it to bpf_put_mem_cgroup. yes bestie, safe. no drama, no tears, just good clean pointer energy πŸ’–


πŸ‘‘ RETURN πŸ‘‘

A pointer to the root memory cgroup. that's it. that's the return. main character pointer energy fr fr ⭐


🌈 SEE ALSO 🌈

the kernel file is literally ./mm/bpf_memcontrol.c, and the whole squad is:

iykyk, go read them too πŸ¦‹πŸ’œ


and that's the page, bestie πŸ’‹ this lil edition is from source/version ./mm, dated October 2026, and it's all about bpf_get_root_mem_cgroup(9). mwah πŸŽ€

πŸ“¦ where this page comes from