Page MenuHomeFreeBSD

vm_pageout_oom(): Allow the option (via sysctl) of panic'ing instead of killing a process when required.
ClosedPublic

Authored by will on Jan 23 2015, 11:46 PM.
Tags
None
Referenced Files
F82190001: D1627.id.diff
Fri, Apr 26, 7:41 AM
F82189990: D1627.diff
Fri, Apr 26, 7:41 AM
Unknown Object (File)
Dec 20 2023, 12:03 AM
Unknown Object (File)
Apr 7 2023, 4:29 PM
Unknown Object (File)
Mar 21 2023, 12:01 PM
Unknown Object (File)
Apr 24 2017, 2:07 PM
Unknown Object (File)
Feb 6 2017, 12:34 AM
Unknown Object (File)
Jan 5 2017, 2:15 AM
Subscribers
None

Details

Reviewers
kib
alc
Summary

This sysctl enables those who would rather panic than kill a process, when the system runs out of memory. Usually, this is most useful when the OOM condition is due to mismanagement of memory, on a system where the applications in question don't respond well to being killed.

In theory, if the system is properly managed, it shouldn't be possible to hit this condition. If it does, the panic can be more desirable for some users (since it can be a good means of finding the root cause) rather than killing the largest process and continuing on its merry way.

Test Plan

Install kernel, sysctl vm.panic_on_oom=1, run the system out of memory. Any further testing that could be done is contingent on the specific situation; this is primarily a development/debugging tool.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

will retitled this revision from to vm_pageout_oom(): Allow the option (via sysctl) of panic'ing instead of killing a process when required..
will updated this object.
will edited the test plan for this revision. (Show Details)
will added reviewers: kib, alc.
will set the repository for this revision to rS FreeBSD src repository - subversion.
kib edited edge metadata.
This revision is now accepted and ready to land.Jan 24 2015, 11:26 AM

There is also protect(1) tool, which uses procctl(PROC_SPROTECT) to ensure that some processes are immune to OOM. Still, I think that panic() option is useful in some environments.

I see that you've already committed this, which is fine. For the record, I have no objections to this change.

alc edited edge metadata.