mem_cgroup_from_private_id(9)
π mem_cgroup_from_private_id(9)
okay so this is a page from the Kernel API Manual β yes bestie, the Kernel API Manual, we're in the big leagues now π β and it's all about mem_cgroup_from_private_id, which is literally the "look up a memcg from a memcg id" girlie. that's the whole vibe. she fetches, she doesn't do much else. iconic minimalism honestly π
β¨ NAME β¨
mem_cgroup_from_private_id β look up a memcg from a memcg id π¦
πΈ SYNOPSIS πΈ
struct mem_cgroup * mem_cgroup_from_private_id (unsigned short id );
like, she takes one tiny unsigned short and hands you back a struct mem_cgroup *. no cap. π«
π ARGUMENTS π
idβ the memcg id to look up. that's it. that's the whole input. she's low-maintenance like that π«Ά
π₯ DESCRIPTION π₯
Caller must hold rcu_read_lock.
that's the ENTIRE description and honestly? she said what she said π the one thing you cannot skip: you, the caller, must be holding rcu_read_lock before you call this. no lock, no lookup. not me being dramatic, that's just the rule fr fr β
π SEE ALSO π
heads up, this list is LONG β the kernel file ./mm/memcontrol.c is out here with a whole friend group, and every single one of them is linked below. go off, memcontrol.c π
get_mem_cgroup_css_from_folio(9)page_cgroup_ino(9)lruvec_page_state_monotonic(9)mod_memcg_state(9)mod_lruvec_state(9)count_memcg_events(9)get_mem_cgroup_from_mm(9)get_mem_cgroup_from_current(9)get_mem_cgroup_from_folio(9)mem_cgroup_iter(9)mem_cgroup_iter_break(9)mem_cgroup_scan_tasks(9)folio_lruvec_lock(9)folio_lruvec_lock_irq(9)folio_lruvec_lock_irqsave(9)mem_cgroup_update_lru_size(9)mem_cgroup_margin(9)mem_cgroup_print_oom_context(9)mem_cgroup_print_oom_meminfo(9)mem_cgroup_get_oom_group(9)consume_stock(9)__memcg_kmem_charge_page(9)__memcg_kmem_uncharge_page(9)mem_cgroup_wb_stats(9)mem_cgroup_css_reset(9)mem_cgroup_calculate_protection(9)mem_cgroup_charge_hugetlb(9)mem_cgroup_swapin_charge_folio(9)mem_cgroup_replace_folio(9)mem_cgroup_migrate(9)mem_cgroup_sk_charge(9)mem_cgroup_sk_uncharge(9)__mem_cgroup_try_charge_swap(9)__mem_cgroup_uncharge_swap(9)obj_cgroup_may_zswap(9)obj_cgroup_charge_zswap(9)obj_cgroup_uncharge_zswap(9)
and that's the page!! mwah π this came out of source ./mm, dated October 2026, and it's still serving mem_cgroup_from_private_id(9) realness to this very day. slay, stay locked, and don't forget your rcu_read_lock bestie ππ§ββοΈ
π¦ 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