page_counter_try_charge(9)
π NAME π
page_counter_try_charge β bestie, this one tries to hierarchically charge pages β¨
π SYNOPSIS π
bool page_counter_try_charge (struct page_counter *counter , unsigned long nr_pages , struct page_counter **fail );
πΈ ARGUMENTS πΈ
counterβ the counter itself, iconic, the main character of this whole situation πnr_pagesβ the number of pages you're trying to charge, like literally how many πfailβ points at the first counter to hit its limit, if any β so if things go sideways, this is who snitches π
π DESCRIPTION π
Returns true on success π β or false plus fail if the counter or any one of its ancestors has hit its configured limit π. Yes, the whole family tree gets a vibe check, not just the counter itself. No cap.
Heads up bestie:failonly gets set when it actually fails β success is just a clean littletrue, periodt.
π¦ SEE ALSO π¦
Kernel file ./mm/page_counter.c β go read it, iykyk π
page_counter_cancel(9)page_counter_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)
okay that's the whole page, you ate that π«Ά this little gem lives in ./mm and it's giving October 2026 energy β the Kernel API Manual said slay and honestly? it did π
β¨
π¦ 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