From: Miroslav Lichvar Date: Thu, 22 May 2014 13:49:11 +0000 (+0200) Subject: sys: set tick_update_hz to 100 by default in Linux driver X-Git-Tag: 1.30-pre1~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14687d003d926e2afebba1d03336201a51045b0f;p=thirdparty%2Fchrony.git sys: set tick_update_hz to 100 by default in Linux driver We can't reliably detect the internal kernel HZ, it may not even be fixed (CONFIG_NO_HZ). Use a fixed value of 100. --- diff --git a/sys_linux.c b/sys_linux.c index 930f55f1..b1041ff8 100644 --- a/sys_linux.c +++ b/sys_linux.c @@ -298,7 +298,10 @@ get_version_specific_details(void) basic_freq_scale = dshift_hz / dhz; nominal_tick = (1000000L + (hz/2))/hz; /* Mirror declaration in kernel */ max_tick_bias = nominal_tick / 10; - tick_update_hz = hz; + + /* We can't reliably detect the internal kernel HZ, it may not even be fixed + (CONFIG_NO_HZ aka tickless), assume the lowest commonly used fixed rate */ + tick_update_hz = 100; /* The basic_freq_scale comes from: * the kernel increments the usec counter HZ times per second (if the timer