]> git.ipfire.org Git - thirdparty/systemd.git/commit
oomd: avoid unnecessary wake-ups for ManagedOOMSwap
authorChristian Hergert <chergert@redhat.com>
Tue, 29 Aug 2023 21:58:10 +0000 (14:58 -0700)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 2 Sep 2023 01:25:58 +0000 (02:25 +0100)
commitb63beb4d283438be2b0f5c62757ab0db7dee8d65
treed6b9e08ffbaf20ed2d2c69a3c69b3548df7d3df2
parentad5db9404e936ebe448d1d2a2a73aca3e5feaf6d
oomd: avoid unnecessary wake-ups for ManagedOOMSwap

If there are no "ManagedOOMSwap" entries to monitor, then the event source
can be completely disabled. This scenario appears to be common and avoiding
the wake-ups can save idle energy consumption.

This was discovered while using Sysprof for various GNOME 45 performance
tuning. systemd-oomd goes from waking up a few times a second to no
wake-ups helping keep a laptop in deep(er) sleep.

Signed-off-by: Christian Hergert <chergert@redhat.com>
src/oom/oomd-manager.c