From: Lennart Poettering Date: Fri, 24 Jul 2015 01:13:57 +0000 (+0200) Subject: automount: lower the idle polling frequency a bit X-Git-Tag: v223~47^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F696%2Fhead;p=thirdparty%2Fsystemd.git automount: lower the idle polling frequency a bit The autofs kernel idle logic requires us to poll the kernel for idleness. This is of course suboptimal, but cannot be fixed without kernel change. Currently the polling frequency is set to 1/10 of the idle timeout. This is quite high, as seen in #571. Let's lower this to 1/3. --- diff --git a/src/core/automount.c b/src/core/automount.c index 90b331f70ea..342dd8f0a97 100644 --- a/src/core/automount.c +++ b/src/core/automount.c @@ -672,7 +672,7 @@ static int automount_start_expire(Automount *a) { assert(a); - timeout = now(CLOCK_MONOTONIC) + MAX(a->timeout_idle_usec/10, USEC_PER_SEC); + timeout = now(CLOCK_MONOTONIC) + MAX(a->timeout_idle_usec/3, USEC_PER_SEC); if (a->expire_event_source) { r = sd_event_source_set_time(a->expire_event_source, timeout);