]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/manager.c
watchdog: reduce watchdog pings in timeout interval
authorAlin Popa <alin.popa@fxdata.ro>
Thu, 2 Apr 2020 07:10:55 +0000 (09:10 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 16 Apr 2020 14:32:05 +0000 (16:32 +0200)
commitc5f8a179a2350717777bdd8ee2a5e04ab0afdbb3
tree6ae10c4c6f6adeede60e209534185eeddc0a229e
parent0f6d7be844d834684603404cfe2ad3007d4bdceb
watchdog: reduce watchdog pings in timeout interval

The watchdog ping is performed for every iteration of manager event
loop. This results in a lot of ioctls on watchdog device driver
especially during boot or if services are aggressively using sd_notify.
Depending on the watchdog device driver this may have performance
impact on embedded systems.
The patch skips sending the watchdog to device driver if the ping is
requested before half of the watchdog timeout.
src/core/manager.c
src/shared/watchdog.c
src/shared/watchdog.h