page_counter_charge(9)
π page_counter_charge(9) π
okay so bestie, welcome to the Kernel API Manual β yes we're reading kernel docs together, this is our bonding time now π«Ά. Today's main character is page_counter_charge(9), and honestly? she's a queen. π
β¨ NAME β¨
page_counter_charge β hierarchically charge pages πΈ
like, she charges pages hierarchically, iykyk. the hierarchy is doing the heavy lifting here, no cap.
β¨ SYNOPSIS β¨
void page_counter_charge (struct page_counter *counter , unsigned long nr_pages );
that's the whole vibe. void return, so she doesn't even tell you how it went β she just does it. π
β¨ ARGUMENTS β¨
counterβ acounter. that's it. that's the argument. the original docs said "counter" and honestly? same. it's astruct page_counter *and that's the whole description, bestie πnr_pagesβ number of pages to charge π₯ literally how many pages you're putting on the tab.
β¨ NOTE β¨
β οΈ big heads up: this does not consider any configured counter limits. none. zero. she does not check the limits, she does not care about the limits, she is simply charging. so if you were expecting her to stop you β she won't π
β¨ SEE ALSO β¨
all the siblings and cousins, found over in the kernel file ./mm/page_counter.c π¦:
page_counter_cancel(9)page_counter_try_charge(9)page_counter_uncharge(9)page_counter_set_max(9)page_counter_set_min(9)page_counter_set_low(9)page_counter_memparse(9)page_counter_calculate_protection(9)
go read them all, they ate π β¨
aaaand that's the page!! π this little love letter lives in ./mm, dated October 2026, and it's giving "kernel internals but make it cute" ππ so long bestie, go charge some pages responsibly π§ββοΈβ¨
π¦ 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