]> git.ipfire.org Git - thirdparty/systemd.git/commit
oomd: rework memory reclaim detection logic
authorAnita Zhang <the.anitazha@gmail.com>
Fri, 26 Mar 2021 07:39:25 +0000 (00:39 -0700)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 7 May 2021 10:06:50 +0000 (12:06 +0200)
commit1851deeea0aff6d748377e8b5f876c38fc237484
tree0f9f2407428509b3c7d9b661d088ec91bed7e6fd
parent574a263fda21e6e6b480822731f7bf95faa6b404
oomd: rework memory reclaim detection logic

systemd-oomd only monitors and kills within a selected cgroup subtree
For memory pressure kills, this means it's unnecessary to get the
pgscan rate across all the monitored memory pressure cgroups.
The increase will show up whether we do a total sum or not, but since
we only care about the increase in the subtree we're about to target
for a kill, we can simplify the code a bit by not doing this total sum.

(cherry picked from commit df637ede7b4e1d0faf8d620d626a0af230712a9e)
src/oom/oomd-manager.c
src/oom/oomd-manager.h
src/oom/oomd-util.c
src/oom/oomd-util.h
src/oom/test-oomd-util.c