TL;DR
A recent Linux kernel patch proposes a mechanism to prevent specific processes, such as xlock, from being killed during out-of-memory (OOM) situations. The development is confirmed but not yet integrated into mainline kernels. It highlights ongoing efforts to improve system reliability under memory pressure.
A Linux kernel patch named ‘oom_pardon’ has been proposed to prevent the system from killing specific processes, such as xlock, during out-of-memory (OOM) conditions. This development aims to improve system stability by protecting essential or user-critical processes from termination during memory shortages.
The patch, discussed in a correspondence from Andries Brouwer to Thomas Habets on September 24, 2004, introduces a mechanism to exempt certain processes from the Linux kernel’s OOM killer. The OOM killer is activated when the system runs out of memory, terminating processes to recover stability. The proposed patch seeks to allow administrators or developers to specify processes that should not be killed, such as xlock, a screen-locking utility.
According to Brouwer, the idea was inspired by a humorous analogy involving aircraft fuel and passenger ejection, illustrating the concept of selectively protecting critical processes during system failure. The patch is still in discussion and has not yet been merged into the mainline kernel. Its implementation details, including how processes would be marked or protected, are still under consideration.
Why It Matters
This development matters because it addresses a common frustration among Linux users and administrators: the loss of important user processes during memory shortages. By preventing critical processes like xlock from being killed, the patch could improve user experience and system reliability, especially in environments where uptime and process persistence are crucial.
However, the patch also raises questions about potential impacts on system stability and memory management. If critical processes are protected but the system remains out of memory, it could lead to other stability issues. The approach reflects ongoing efforts to balance resource management with user control.

Linux Monitoring: A Practical Guide to Linux Monitoring (Modern Cloud & AI Engineering Series Book 5)
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Background
Linux’s OOM killer was introduced to handle situations where the system runs out of memory, by terminating processes to free resources. Historically, this process can sometimes kill essential or user-critical processes, leading to user frustration or system instability. The idea of selectively exempting processes from OOM killing has been discussed informally for years, but only recently has a concrete patch been proposed.
The discussion on September 23-24, 2004, by kernel developer Andries Brouwer, indicates active interest in refining OOM handling. The patch is part of broader efforts to improve Linux’s memory management and process control, especially in desktop and server environments where process persistence is valued.
“The patch aims to prevent critical processes like xlock from being killed during OOM conditions, enhancing system stability.”
— Andries Brouwer
“He suggested a sysctl to prevent processes from being killed during OOM, or even cause a system panic if necessary.”
— Thomas Habets
Linux process management software
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
What Remains Unclear
It is not yet clear whether the patch will be accepted into the mainline kernel or how it will be implemented technically. Details about how processes would be marked or protected remain under discussion. The overall impact on system stability and memory management is still uncertain and will depend on further testing and review.
Linux kernel patch management
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
What’s Next
The next step involves further review and testing of the ‘oom_pardon’ patch by kernel developers. If accepted, it could be merged into future kernel releases, providing users with more control over process termination during memory shortages. Monitoring discussions and updates from the Linux kernel development community will be essential to track its progress.
Linux memory management utilities
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Key Questions
What is the ‘oom_pardon’ patch?
The ‘oom_pardon’ patch is a proposed modification to the Linux kernel that aims to prevent specific processes, such as xlock, from being terminated during out-of-memory conditions.
Why is this patch important?
It addresses user frustration caused by critical processes being killed during memory shortages, potentially improving system stability and process persistence.
Has the patch been adopted into the mainline kernel?
No, it is currently under discussion and has not yet been merged. Further review and testing are needed.
Could protecting processes from OOM killer cause problems?
Yes, if critical processes are protected but the system remains out of memory, it could lead to stability issues. The balance between process protection and overall system health is still being evaluated.
Source: Hacker News