bpf_get_root_mem_cgroup(9)
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:
bpf_get_mem_cgroup(9)bpf_put_mem_cgroup(9)bpf_mem_cgroup_vm_events(9)bpf_mem_cgroup_usage(9)bpf_mem_cgroup_memory_events(9)bpf_mem_cgroup_page_state(9)bpf_mem_cgroup_flush_stats(9)
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
- 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