domain_dirty_limits(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” the dirty_throttle_control of 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 that dtc->avail is set before calling this function. like, must must. not "should", not "eh probably". you set dtc->avail first, 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:

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