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)
committerAnita Zhang <the.anitazha@gmail.com>
Thu, 20 Jan 2022 22:15:13 +0000 (14:15 -0800)
commit914d4e99f43761f1ce77b520850cf096aa5196cd
tree717b1ac211a5f0edfdc99935aa29728fecc0602f
parent2ee209466bb51f39ae9df7fec4d5594ce8cfa3f0
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.
src/oom/oomd-manager.c
src/oom/oomd-util.c