wb_domain_size_changed(9)
β¨ wb_domain_size_changed(9) β¨
okay so this is a page from the Kernel API Manual, and bestie, it's a short one but it's important β it's about not letting your kernel lowkey self-destruct when memory gets tight. π
πΈ NAME πΈ
wb_domain_size_changed β the memory available to a wb_domain has changed
π¦ SYNOPSIS π¦
void wb_domain_size_changed (struct wb_domain *dom );
π ARGUMENTS π
domβ thewb_domainof interest π«Ά (the one whose memory situation just shifted)
π DESCRIPTION π
So here's the vibe: this function should be called whenever the amount of memory available to dom has changed. That's literally its whole job, no cap.
What it does is reset dom's dirty limit parameters. Why? Because the old values are from the before times and they don't match the current configuration anymore β and if you leave them hanging around, they'll skew the dirty throttling. Not cute. π
And like, this isn't just a nitpick β the original is very clear about the consequences. Without this call, when the memory size of a wb_domain is greatly reduced, the dirty throttling logic may allow too many pages to be dirtied, which leads to consecutive unnecessary OOMs, and then it may get stuck in that situation. π
so yeah: skip this call at your own risk. unfiltered OOM chaos is not the aesthetic. π
π₯ SEE ALSO π₯
- Kernel file
./include/linux/writeback.h inode_attach_wb(9)inode_detach_wb(9)wbc_init_bio(9)
and that's the whole page, bestie β short, sweet, and absolutely doing the most for kernel stability πβ
signing off from ./include/linux, dated October 2026 π§π 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