How does the OOM Killer stop its victim process?
Suppose the machine is short on memory and the OOM Killer has selected a target process to shut down (in order to reclaim memory).
How does the OOM killer actually kill the process? Is it done using one of the standard signals, or does it perhaps have some special tricks up its sleeve?
1 answer
I couldn't find a definitive authoritative documentation anywhere but this seems pretty good:
Mel Gorman: Understanding the Linux Virtual Memory Manager, Section 13.4
Once a task is selected, the list is walked again and each process that shares the same mm_struct as the selected process (i.e. they are threads) is sent a signal. If the process has CAP_SYS_RAWIO capabilities, a SIGTERM is sent to give the process a chance of exiting cleanly, otherwise a SIGKILL is sent.
0 comment threads