]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/oom/oomd-util.c
oomd: increase accuracy of SwapUsedLimit= to permyriads too 18659/head
authorLennart Poettering <lennart@poettering.net>
Wed, 17 Feb 2021 16:56:26 +0000 (17:56 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 18 Feb 2021 21:40:47 +0000 (22:40 +0100)
commitd06e7fb53233bac014d1c3c9899ee291dcda1f71
tree480cafc30a86f5374adb85dbdefab6bf0101fa39
parentd9d3f05def0057cc064a05f8cbfb5f398779cd8c
oomd: increase accuracy of SwapUsedLimit= to permyriads too

oomd.conf has two parameters with fractionals: SwapUsedLimit= and
DefaultMemoryPressureLimit=, but one accepts permyriads, the other only
percentages, for no apparent reason. One carries the "Percent" in the
name, the other doesn't.

Let's clean this up: always accept permyriads, and drop the suffix,
given that it is misleading.

I figure we should internally try to focus on scaling everything
relative to UINT32_MAX, and if that isn't in the cards at least 10000,
but never permille nor percent unless there's a really really good
reason for it (e.g. interface defined by someone else).
man/oomd.conf.xml
src/oom/oomd-manager.c
src/oom/oomd-manager.h
src/oom/oomd-util.c
src/oom/oomd-util.h
src/oom/oomd.c
src/oom/oomd.conf
src/oom/test-oomd-util.c