global_dirty_limits(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– global_dirty_limits(9) πŸ’–

okay so this is a page from the Kernel API Manual (yes bestie, the kernel has lore) and it's literally all about global_dirty_limits β€” the cutoff numbers that decide when the kernel starts stressing about dirty pages. iconic behavior honestly πŸŽ€


✨ NAME ✨

global_dirty_limits β€” the background-writeback and dirty-throttling thresholds πŸ¦‹

like, the two vibes the kernel uses to know when to chill and when to panic about dirty data. no cap.


🌸 SYNOPSIS 🌸

void global_dirty_limits (unsigned long *pbackground , unsigned long *pdirty );

that's it. that's the whole signature. two pointers in, nothing out (it's a void, she doesn't return anything, she just fills your pointers and leaves πŸ’…).


🫢 ARGUMENTS 🫢

  • pbackground β€” an out parameter for bg_thresh. you hand her a pointer, she writes the background threshold into it. you're not giving info, you're receiving it. main character energy on her part tbh ✨
  • pdirty β€” an out parameter for thresh. same deal: she fills this one in with the dirty threshold. two outputs, zero drama 😌

πŸ”₯ DESCRIPTION πŸ”₯

so what does she actually do? she calculates bg_thresh and thresh for global_wb_domain. that's the whole job. those are the two numbers you asked for and she delivers them through your out parameters 🧚

and if you want the full tea on how it all works? the page says to see domain_dirty_limits for details. so like, go read that one, she's the one with the actual explanation πŸ’œ


πŸ¦‹ SEE ALSO πŸ¦‹

this is the little friend group she runs with, iykyk πŸ“

Kernel file ./mm/page-writeback.c, plus:

go read them, they're all slaying in their own ways πŸ‘‘


reminder bestie: she writes through pbackground and pdirty, so those pointers better be real and valid. do not pass her a vibe. pass her an actual unsigned long * πŸ™ˆ

and that's the page!! πŸŽ€ this one lives in ./mm, dated October 2026, and it's filed under the name global_dirty_limits(9). periodt. πŸ’œβœ¨

πŸ“¦ where this page comes from