oom: fix reclaim activity detection
authorAnita Zhang <the.anitazha@gmail.com>
Sun, 24 Jan 2021 09:22:51 +0000 (01:22 -0800)
committerAnita Zhang <the.anitazha@gmail.com>
Sun, 24 Jan 2021 10:02:09 +0000 (02:02 -0800)
commit924c89e9fe95d47b6ad94544bfdd5f087646daea
treef742abb44202f47f70fbddecad33616094d0dc98
parent408a3bbd76326793ea5d1cf4e0a9444a4c252d86
oom: fix reclaim activity detection

This should have been checking for any reclaim activity within a larger interval
of time rather than within the past second. On systems with swap this
doesn't seem to have mattered too much as reclaim would always increase when
memory pressure was elevated. But testing in the no swap case having
this larger interval made a difference between oomd killing or not.
src/oom/oomd-manager.c
src/oom/oomd-manager.h