diff options
author | Anita Zhang <the.anitazha@gmail.com> | 2021-03-15 17:21:45 -0700 |
---|---|---|
committer | Anita Zhang <the.anitazha@gmail.com> | 2021-03-17 10:17:03 -0700 |
commit | 88e47952af55f38e3ae2a3129df7438eb05c0e5d (patch) | |
tree | b30d8b4705fb76f3f849ca8b2c3b79297ce3b453 /src/oom/oomd-manager.c | |
parent | 91cbb4bdd64048931c18e4b9a3d0ab85d77f93fe (diff) | |
download | systemd-88e47952af55f38e3ae2a3129df7438eb05c0e5d.tar.gz |
oomd: sort by pgscan rate not pgscan
For pressure based killing we want to target who has the highest
increase in pgscan from the previous interval (vs. the previous logic
which used raw pgscan). This will prevent biasing towards long running
cgroups as mentioned in #19007.
Diffstat (limited to 'src/oom/oomd-manager.c')
-rw-r--r-- | src/oom/oomd-manager.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/oom/oomd-manager.c b/src/oom/oomd-manager.c index 6ce96062a1..72781f3e88 100644 --- a/src/oom/oomd-manager.c +++ b/src/oom/oomd-manager.c @@ -357,9 +357,9 @@ static int monitor_cgroup_contexts_handler(sd_event_source *s, uint64_t usec, vo log_notice("Memory pressure for %s is greater than %lu for more than %"PRIu64" seconds and there was reclaim activity", t->path, LOAD_INT(t->mem_pressure_limit), m->default_mem_pressure_duration_usec / USEC_PER_SEC); - r = oomd_kill_by_pgscan(m->monitored_mem_pressure_cgroup_contexts_candidates, t->path, m->dry_run); + r = oomd_kill_by_pgscan_rate(m->monitored_mem_pressure_cgroup_contexts_candidates, t->path, m->dry_run); if (r == -ENOMEM) - return log_error_errno(r, "Failed to kill cgroup processes by pgscan"); + return log_error_errno(r, "Failed to kill cgroup processes by pgscan rate: %m"); if (r < 0) log_info("Failed to kill any cgroup(s) under %s based on pressure", t->path); else { |