oomd: handle situations when no cgroups are killed
authorAnita Zhang <the.anitazha@gmail.com>
Wed, 19 Jan 2022 21:26:01 +0000 (13:26 -0800)
committerLuca Boccassi <bluca@debian.org>
Mon, 14 Feb 2022 21:56:48 +0000 (21:56 +0000)
commitc4d89cd602b94ab3baac746395c797ec4da43679
treeda714e5759340fb22afd0ed9e3f58f0f1c76b57a
parent0456e3aaaae7c21a037f4d3c758463c3ba4d167c
oomd: handle situations when no cgroups are killed

Currently if systemd-oomd doesn't kill anything in a selected cgroup, it
selects a new candidate immediately. But if a selected cgroup wasn't killed,
it is likely due to it disappearing or getting cleaned up between the time
it was selected as a candidate and getting sent SIGKILL(s). We should handle
it as though systemd-oomd did perform a kill so that it will check
swap/pressure again before it tries to select a new candidate.

(cherry picked from commit 914d4e99f43761f1ce77b520850cf096aa5196cd)
src/oom/oomd-manager.c
src/oom/oomd-util.c