diff options
author | Anita Zhang <the.anitazha@gmail.com> | 2021-02-09 01:47:34 -0800 |
---|---|---|
committer | Anita Zhang <the.anitazha@gmail.com> | 2021-02-09 02:27:40 -0800 |
commit | 59331b8e292a93bc7a03a51fe54cb65a4257e894 (patch) | |
tree | 3b420e7a81168b54d8a6578fd3ea52b593c2a4af /docs/TRANSIENT-SETTINGS.md | |
parent | 242d75bdaaa6f222a47148f8a83cc425d6ceefb3 (diff) | |
download | systemd-59331b8e292a93bc7a03a51fe54cb65a4257e894.tar.gz |
oom: implement avoid/omit xattr support
There may be situations where a cgroup should be protected from killing
or deprioritized as a candidate. In FB oomd xattrs are used to bias oomd
away from supervisor cgroups and towards worker cgroups in container
tasks. On desktops this can be used to protect important units with
unpredictable resource consumption.
The patch allows systemd-oomd to understand 2 xattrs:
"user.oomd_avoid" and "user.oomd_omit". If systemd-oomd sees these
xattrs set to 1 on a candidate cgroup (i.e. while attempting to kill something)
AND the cgroup is owned by root, it will either deprioritize the cgroup as
a candidate (avoid) or remove it completely as a candidate (omit).
Usage is restricted to root owned cgroups to prevent situations where an
unprivileged user can set their own cgroups lower in the kill priority than
another user's (and prevent them from omitting their units from
systemd-oomd killing).
Diffstat (limited to 'docs/TRANSIENT-SETTINGS.md')
0 files changed, 0 insertions, 0 deletions