]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
automount: lower the idle polling frequency a bit 696/head
authorLennart Poettering <lennart@poettering.net>
Fri, 24 Jul 2015 01:13:57 +0000 (03:13 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 24 Jul 2015 01:13:57 +0000 (03:13 +0200)
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.

src/core/automount.c

index 90b331f70ea19c2ed45ac8d96ef9d33bb0619dd1..342dd8f0a9736b197530ee4b6840146878389910 100644 (file)
@@ -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);