mod_memcg_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mod_memcg_state β€” like, the cgroup memory stats updater (from the Kernel API Manual, bestie)

okay so picture this: it's a void function and it's literally just here to keep cgroup memory statistics updated. No return value, no drama, just vibes and counter math. ✨


🌸 SYNOPSIS 🌸

void mod_memcg_state (struct mem_cgroup *memcg , enum memcg_stat_item
idx , int val );

Like I said β€” void, so don't go looking for a return value, she gives you nothing back and that's iconic of her. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • memcg β€” the memory cgroup in question, aka the whole reason we're here 🫢
  • idx β€” the stat item you're poking at; it can be an enum memcg_stat_item or an enum node_stat_item, so yes, either one, she's flexible like that
  • val β€” the delta you're adding to the counter, and bestie, it can be negative, so this is not always a glow-up β€” sometimes we're subtracting 😭

πŸ¦‹ SEE ALSO πŸ¦‹

The kernel file to go peek at is ./mm/memcontrol.c, and then there's this whole friend group of related calls β€” go say hi:


and that's the whole page, no cap πŸ’– this lil' manpage lives in ./mm, it's dated October 2026, and it's filed under mod_memcg_state(9) β€” mwah, go update those stats bestie, ily πŸ§šβ€β™€οΈβœ¨πŸŽ€

πŸ“¦ where this page comes from