diff options
author | Nishal Kulkarni <nishalkulkarni@gmail.com> | 2022-03-13 20:05:18 +0100 |
---|---|---|
committer | Nishal Kulkarni <nishalkulkarni@gmail.com> | 2022-03-22 13:27:59 +0100 |
commit | 38c41427c7ee9a6209b84e7b17b1df5774d8f1ed (patch) | |
tree | d158d3034c88b278b10de3624b46d0ed794b268f /src/core/service.h | |
parent | core/cgroup: Add OOM check (diff) | |
download | systemd-38c41427c7ee9a6209b84e7b17b1df5774d8f1ed.tar.xz systemd-38c41427c7ee9a6209b84e7b17b1df5774d8f1ed.zip |
core/oomd: Use oom-kill ServiceResult for oomd
To notify user of kill events from systemd-oomd we now use
`SERVICE_FAILURE_OOM_KILL` as the failure result.
`unit_check_oomd_kill` now calls `notify_cgroup_oom` to
update the service result to `oom-kill`.
We add a new xattr `user.oomd_ooms` to keep track of the OOM kills
initiated by systemd-oomd, this helps us resolve a race between sending
SIGKILL to processes and checking for OOM kill status from the xattr.
Related to: #20649
Diffstat (limited to 'src/core/service.h')
-rw-r--r-- | src/core/service.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/service.h b/src/core/service.h index 4116e40d8f..91e02e6d7e 100644 --- a/src/core/service.h +++ b/src/core/service.h @@ -75,7 +75,7 @@ typedef enum ServiceResult { SERVICE_FAILURE_CORE_DUMP, SERVICE_FAILURE_WATCHDOG, SERVICE_FAILURE_START_LIMIT_HIT, - SERVICE_FAILURE_OOM_KILL, + SERVICE_FAILURE_OOM_KILL, /* OOM Kill by the Kernel or systemd-oomd */ SERVICE_SKIP_CONDITION, _SERVICE_RESULT_MAX, _SERVICE_RESULT_INVALID = -EINVAL, |