oomd: don't get pressure candidates on every interval
authorAnita Zhang <the.anitazha@gmail.com>
Fri, 26 Mar 2021 08:53:15 +0000 (01:53 -0700)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 7 May 2021 10:07:21 +0000 (12:07 +0200)
commitf64e1846ee51a1969f0abadddca66ab2fc1235c8
tree738639830fcc474a2f85447a31290affd28ec4e9
parent762e31c0b4ed48bebc651a38d6c2e56ec5b7b0e8
oomd: don't get pressure candidates on every interval

Only start collecting candidates for a memory pressure kill when we're
hitting the limit (but before the duration hitting that limit is
exceeded). This brings CPU util from ~1% to 0.3%.

Addresses CPU util from
https://bugzilla.redhat.com/show_bug.cgi?id=1941340
and
https://bugzilla.redhat.com/show_bug.cgi?id=1944646

(cherry picked from commit cb13961ada52c1b27f6d6c2c6e37a2901f01ed30)
src/oom/oomd-manager.c