Page MenuHomeFreeBSD

vm_pageout: Make the OOM killer less aggressive
ClosedPublic

Authored by markj on Jun 24 2025, 3:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 18, 5:38 PM
Unknown Object (File)
Tue, Oct 14, 2:41 PM
Unknown Object (File)
Sun, Oct 12, 12:13 PM
Unknown Object (File)
Sun, Oct 12, 12:13 PM
Unknown Object (File)
Sun, Oct 12, 12:13 PM
Unknown Object (File)
Sun, Oct 12, 1:16 AM
Unknown Object (File)
Sat, Oct 4, 9:50 PM
Unknown Object (File)
Fri, Sep 26, 6:28 PM
Subscribers

Details

Summary

Reset the sequence counter if we observe that there is no instantaneous
page shortage.

This case can arise if we enter a shortfall of clean, inactive pages.
The PID controller will attempt to overshoot the reclamation target
because repeated scans of the inactive queue are mostly just moving
pages to the laundry queue. The laundry thread will launder pages and
move them back to the head of the inactive queue to be reclaimed, but
this does not happen immediately, so the integral term of the PID
controller grows and the page daemon tries to reclaim pages in excess of
the setpoint. However, the laundry thread will only launder enough
pages to meet the shortfall: vm_laundry_target(), which is the same as
the setpoint.

As a consequence of this, the page daemon may repeatedly fail to meet
its target, and without this seatbelt it may trigger an OOM kill.
However, we obviously shouldn't do that if we're at or above the
setpoint.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable