oomd: split swap and mem pressure event timers
authorAnita Zhang <the.anitazha@gmail.com>
Wed, 24 Mar 2021 09:17:04 +0000 (02:17 -0700)
committerAnita Zhang <the.anitazha@gmail.com>
Fri, 2 Apr 2021 02:44:14 +0000 (19:44 -0700)
commit81d66fab342e112aefe8b5f43bc853ef66c92add
tree38a79355fc512b0bc2f80ebd8445255c32f0d816
parent8ab34a49dbf75fd731973359a6f24c212682f479
oomd: split swap and mem pressure event timers

One thing that came out of the test week is that systoomd needs to poll
more frequently so as not to race with the kernel oom killer in
situations where memory is eaten quickly. Memory pressure counters are
lagging so it isn't worthwhile to change the current read rate; however swap
is not lagging and can be checked more frequently.

So let's split these into 2 different timer events. As a result, swap
now also doesn't have to be subject to the post-action (post-kill) delay
that we need for memory pressure events.

Addresses some of slowness to kill discussed in
https://bugzilla.redhat.com/show_bug.cgi?id=1941340
src/oom/oomd-manager.c
src/oom/oomd-manager.h