global_dirty_limits(9)
π 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 forbg_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 forthresh. 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:
node_dirtyable_memory(9)global_dirtyable_memory(9)domain_dirty_limits(9)node_dirty_limit(9)node_dirty_ok(9)__wb_calc_thresh(9)balance_dirty_pages_ratelimited_flags(9)balance_dirty_pages_ratelimited(9)wb_over_bg_thresh(9)tag_pages_for_writeback(9)writeback_iter(9)filemap_dirty_folio(9)folio_redirty_for_writepage(9)folio_mark_dirty(9)folio_wait_writeback(9)folio_wait_writeback_killable(9)folio_wait_stable(9)
go read them, they're all slaying in their own ways π
reminder bestie: she writes throughpbackgroundandpdirty, so those pointers better be real and valid. do not pass her a vibe. pass her an actualunsigned 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
- 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