__memcg_kmem_charge_page(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __memcg_kmem_charge_page β€” the girlies' guide πŸ’–

okay so bestie, quick vibe check: this page is from the Kernel API Manual (section 9, kernel developer land 🧚), and honestly? the name is a whole mouthful but the job is chef's kiss simple. let's get into it ✨


🌸 SYNOPSIS 🌸

int __memcg_kmem_charge_page (struct page *page , gfp_t gfp , int order );

like, she returns an int, she takes three things, and she's serving main character energy in mm/memcontrol.c. periodt πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • page β€” the struct page * you wanna charge. that's the actual page being charged, bestie, no cap 🫢
  • gfp β€” the reclaim mode πŸ”₯ (yes, the gfp_t one, you know her)
  • order β€” the allocation order, lowkey important ngl πŸ¦‹

⭐ DESCRIPTION ⭐

so what does she do? she charges a kmem page to the current memory cgroup. that's the whole vibe πŸ’œ

and what does she give back?

  • returns 0 on success πŸ‘‘
  • returns an error code on failure 😭

that's literally it. no hidden lore, no plot twist. iconic of her fr fr πŸ“


🌈 SEE ALSO 🌈

okay this list is LONG, like not me scrolling, so buckle in bestie 🫢 β€” every single one of these, in order:

and if you're wondering where she actually lives? kernel file ./mm/memcontrol.c β€” that's her address, iykyk πŸ πŸ’…


🫢 friendly reminder bestie: if it fails, it hands you back an error code, not 0. don't be out here treating every return like a success, that's giving bug report energy 😭

and that's the whole page, diva ✨ this icon was brought to you by the kernel docs crew, source ./mm, dated October 2026 β€” see you in the next man page, mwah πŸ’‹πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from