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>
Tue, 15 Feb 2022 01:13:47 +0000 (01:13 +0000)
commit07b5c382361a310b3ec1fa6ccfcfc99fb4fc1ee0
treeafe32a91ccb447686e40f201f476c1e2fc78e056
parent1656ad6fd17e5be6504785bf94495437bcf453cb
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)
(cherry picked from commit c4d89cd602b94ab3baac746395c797ec4da43679)
src/oom/oomd-manager.c
src/oom/oomd-util.c