Page MenuHomeFreeBSD

Modify the vm.panic_on_oom sysctl to take a count of events
ClosedPublic

Authored by jtl on Feb 10 2020, 3:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 30, 4:14 PM
Unknown Object (File)
Dec 22 2023, 10:30 PM
Unknown Object (File)
Oct 25 2023, 8:18 AM
Unknown Object (File)
Oct 19 2023, 7:26 PM
Unknown Object (File)
Oct 19 2023, 8:13 AM
Unknown Object (File)
Sep 7 2023, 2:12 PM
Unknown Object (File)
Sep 7 2023, 2:07 PM
Unknown Object (File)
Sep 7 2023, 2:07 PM
Subscribers

Details

Summary

Currently, the vm.panic_on_oom sysctl is a boolean. If set to 0, the VM system kills the largest process. If set to any other value, the VM system panics.

This change makes it a count of events. If set to 0, the VM system kills the largest process. If set to any other value, the VM system will kill the largest process until it has seen the specified number of out-of-memory events. Once it reaches the specified number of events, it will panic.

This change is helpful in capturing cores when the system is in a perpetual cycle of out-of-memory events (as opposed to just hitting one or two sporadic out-of-memory events).

Test Plan

Run on a system. Induce memory pressure. Ensure the system panics after the specified number of events. (This tested correctly.)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 29269
Build 27183: arc lint + arc unit