mem_cgroup_replace_folio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ mem_cgroup_replace_folio ✨

Ok so bestie, welcome to the mem_cgroup_replace_folio(9) page from the Kernel API Manual πŸ’… β€” it's short, it's sweet, and it's literally about swapping one folio's charge onto another. Let's get into it πŸŽ€


🌸 NAME 🌸

mem_cgroup_replace_folio β€” charge a folio's replacement. That's it, that's the whole vibe 🫢


⭐ SYNOPSIS ⭐

void mem_cgroup_replace_folio (struct folio *old , struct folio *new );

Two folios walk in. Only one leaves with the charge πŸ‘‘ (and it's new, spoiler alert).


πŸ¦‹ ARGUMENTS πŸ¦‹

  • old β€” the folio that's currently circulating out here in the wild, main character of the moment. This one's on its way out πŸ₯²
  • new β€” the replacement folio. The glow-up. The understudy stepping into the spotlight ✨

πŸ’– DESCRIPTION πŸ’–

So here's the tea, bestie: this function charges new as a replacement folio for old. Like, it hands the charge over. And old? She doesn't get charged anymore once she's freed β€” old will be uncharged upon free. Periodt πŸ’€

Important, no cap: both folios must be locked, and new->mapping must be set up. Not optional, not negotiable, it's giving prerequisites πŸ”₯

πŸ” SEE ALSO πŸ”

Kernel file ./mm/memcontrol.c β€” and bestie, there is a whole friend group here, I'm obsessed. Go say hi:


Anyway bestie, that's the page πŸ’œ this one's from ./mm, dated October 2026, and it's the mem_cgroup_replace_folio(9) manual page. Slay, go lock your folios, ily πŸ§šβ€β™€οΈπŸŒŸ

πŸ“¦ where this page comes from