domain_dirty_limits(9)
π domain_dirty_limits(9) π
okay so welcome to domain_dirty_limits, bestie β it's a kernel API manual entry (section 9, the fancy "kernel developer" section π) and honestly it's giving "tiny function, huge responsibilities."
β¨ NAME β¨
domain_dirty_limits β literally just: calculate thresh and bg_thresh for a wb_domain. that's the whole vibe. no cap.
π¦ SYNOPSIS π¦
void domain_dirty_limits (struct dirty_throttle_control *dtc );
yes queen, that's the entire signature. void in, vibes out. π
πΈ ARGUMENTS πΈ
dtcβ thedirty_throttle_controlof interest π. like, the specific one you care about. your main character struct, if you will.
π DESCRIPTION π
so here's what's actually happening, and it's lowkey important:
domain_dirty_limits calculates dtc->thresh and ->bg_thresh, and it does that by considering vm_dirty_{bytes|ratio} and dirty_background_{bytes|ratio}. those four knobs are the whole personality of this function ngl. π«Ά
β οΈ the caller MUST ensure thatdtc->availis set before calling this function. like, must must. not "should", not "eh probably". you setdtc->availfirst, then you call. please and thank you π
and the cute little plot twist: the dirty limits will be lifted by 1/4 for real-time tasks. so RT tasks get that extra quarter headroom β iconic behaviour, honestly. β¨π₯
π SEE ALSO π
okay this list is long long, but we don't skip. we never skip. everything's here, bestie:
Kernel file ./mm/page-writeback.c, plus:
node_dirtyable_memory(9)global_dirtyable_memory(9)global_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)
iykyk, this is the whole writeback friend group ππ
made with love in the ./mm directory, dated October 2026, and this little entry is officially titled domain_dirty_limits(9) β mwah, go set your dtc->avail and slay ππβ¨
π¦ 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