bpf_mem_cgroup_page_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– bpf_mem_cgroup_page_state(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual page for bpf_mem_cgroup_page_state(9) β€” yes the whole thing is named after the function, that's just how these girlies roll ✨


🌸 NAME 🌸

bpf_mem_cgroup_page_state β€” literally just reads a memory cgroup's page state counter πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

__bpf_kfunc unsigned long bpf_mem_cgroup_page_state (struct mem_cgroup
*memcg , int idx );

like. that's it. that's the whole vibe check πŸ’…


πŸ“ ARGUMENTS πŸ“

  • memcg β€” the memory cgroup, aka the thing you're snooping on πŸ‘€
  • idx β€” the counter idx, aka which counter you want, bestie, pick one 🎯

✨ DESCRIPTION ✨

So this little icon lets you read memory cgroup statistics πŸ’– The output is in bytes. That's it, that's the tea β˜• No cap, it's giving "simple and useful."


πŸ‘‘ RETURN πŸ‘‘

The value of the page state counter, in bytes πŸ’€ (yes, bytes, don't @ me)


🌈 SEE ALSO 🌈

Kernel file ./mm/bpf_memcontrol.c 🧚 and honestly the whole friend group:

like get you a kfunc that can do all of this, fr fr 🫢


okay that's the whole page, bestie 🌸 this came out of ./mm, dated October 2026, and it's filed under bpf_mem_cgroup_page_state(9) β€” mwah, slay, periodt πŸ’…πŸ’–

πŸ“¦ where this page comes from