]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Modify the vm.panic_on_oom sysctl to take a count of events.
authorjtl <jtl@FreeBSD.org>
Mon, 10 Feb 2020 18:06:38 +0000 (18:06 +0000)
committerjtl <jtl@FreeBSD.org>
Mon, 10 Feb 2020 18:06:38 +0000 (18:06 +0000)
commite718dc4f0ab7db4402c3ec1c0b9a1f97c51a5123
treea2079b646e85d033bcac7df9f81d20ac45b63b95
parentec057b7fe75479698d63a092201096ea693c2cd2
Modify the vm.panic_on_oom sysctl to take a count of events.

Currently, the vm.panic_on_oom sysctl is a boolean which controls the
behavior of the VM system when it encounters an out-of-memory situation.
If set to 0, the VM system kills the largest process. If set to any other
value, the VM system will initiate a panic.

This change makes the sysctl 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 initiate a 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).

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D23601
sys/vm/vm_pageout.c