Re: [systemd-devel] [systemd-commits] src/timesync

2015-02-05 Thread Miroslav Lichvar
oading network or servers. Once per 10 seconds is way too frequent. -- Miroslav Lichvar ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] [PATCH 8/8] timesyncd: wait before reconnecting to first server

2014-09-02 Thread Miroslav Lichvar
On Tue, Sep 02, 2014 at 02:32:37PM +0200, Kay Sievers wrote: > On Tue, Sep 2, 2014 at 1:15 PM, Miroslav Lichvar wrote: > >> There is also some code in src/timesync/timesyncd-manager.c +209: > >> /* re-arm timer with increasing timeout, > >> in case

Re: [systemd-devel] [PATCH 7/8] timesyncd: don't reset polling interval when reselecting server

2014-09-02 Thread Miroslav Lichvar
On Fri, Aug 29, 2014 at 06:38:49PM +0200, Kay Sievers wrote: > On Wed, Aug 27, 2014 at 4:47 PM, Miroslav Lichvar wrote: > > --- > > src/timesync/timesyncd-manager.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > It did not apply without the earlier

Re: [systemd-devel] [PATCH 6/8] timesyncd: allow two missed replies before reselecting server

2014-09-02 Thread Miroslav Lichvar
On Fri, Aug 29, 2014 at 06:31:10PM +0200, Kay Sievers wrote: > On Wed, Aug 27, 2014 at 4:47 PM, Miroslav Lichvar wrote: > > After receiving a reply from the server, allow two missed replies before > > switching to another server to avoid unnecessary clock hopping when > > pac

Re: [systemd-devel] [PATCH 8/8] timesyncd: wait before reconnecting to first server

2014-09-02 Thread Miroslav Lichvar
On Fri, Aug 29, 2014 at 06:45:24PM +0200, Kay Sievers wrote: > On Wed, Aug 27, 2014 at 4:47 PM, Miroslav Lichvar wrote: > > When all servers are exhausted, wait for one poll interval before trying > > to connect again to the first server in the list. Also, keep increasing > >

Re: [systemd-devel] [PATCH 5/8] timesyncd: use longer PLL time constant

2014-09-02 Thread Miroslav Lichvar
On Fri, Aug 29, 2014 at 06:29:54PM +0200, Kay Sievers wrote: > On Wed, Aug 27, 2014 at 4:47 PM, Miroslav Lichvar wrote: > > The shortest time constant that is stable with the kernel PLL (compiled > > with SHIFT_PLL=2) is about log2 of update interval - 3. Set the constant > >

[systemd-devel] [PATCH 2/8] timesyncd: fix calculation of transmit time

2014-08-27 Thread Miroslav Lichvar
The kernel timestamp (recv_time) is made earlier than current time (now_ts), use the timestamp captured before sending packet directly. --- src/timesync/timesyncd-manager.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesy

[systemd-devel] [PATCH 3/8] timesyncd: get kernel timestamp in nanoseconds

2014-08-27 Thread Miroslav Lichvar
--- src/timesync/timesyncd-manager.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c index 3339606..2b0580c 100644 --- a/src/timesync/timesyncd-manager.c +++ b/src/timesync/timesyncd-manager.c @@

[systemd-devel] [PATCH 0/8] timesyncd bugfixing and improvements

2014-08-27 Thread Miroslav Lichvar
problem in the function adjusting the polling interval, it doesn't consider jitter. When the jitter is large it goes for a shorter interval instead of longer, making everything worse. My suggestion would be to include the approach used in ntpd (search for CLOCK_PGATE in the sources). Miro

[systemd-devel] [PATCH 8/8] timesyncd: wait before reconnecting to first server

2014-08-27 Thread Miroslav Lichvar
When all servers are exhausted, wait for one poll interval before trying to connect again to the first server in the list. Also, keep increasing the polling interval to make sure a client not getting any valid replies will not send requests to any server more frequently than is allowed by the maxim

[systemd-devel] [PATCH 4/8] timesyncd: check root distance

2014-08-27 Thread Miroslav Lichvar
NTPv4 servers don't reply with unsynchronized status when they lost synchronization, they only keep increasing the root dispersion and it's up to the client to decide at which point they no longer consider it synchronized. Ignore replies with root distance over 5 seconds. --- src/timesync/timesyn

[systemd-devel] [PATCH 5/8] timesyncd: use longer PLL time constant

2014-08-27 Thread Miroslav Lichvar
The shortest time constant that is stable with the kernel PLL (compiled with SHIFT_PLL=2) is about log2 of update interval - 3. Set the constant to poll - 2 to make room for one missed update. --- src/timesync/timesyncd-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[systemd-devel] [PATCH 6/8] timesyncd: allow two missed replies before reselecting server

2014-08-27 Thread Miroslav Lichvar
After receiving a reply from the server, allow two missed replies before switching to another server to avoid unnecessary clock hopping when packets are getting lost in the network. --- src/timesync/timesyncd-manager.c | 27 ++- src/timesync/timesyncd-manager.h | 1 + 2 fi

[systemd-devel] [PATCH 1/8] timesyncd: check if stratum is valid

2014-08-27 Thread Miroslav Lichvar
--- src/timesync/timesyncd-manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c index d80c72f..60f39c6 100644 --- a/src/timesync/timesyncd-manager.c +++ b/src/timesync/timesyncd-manager.c @@ -574,7 +574,

[systemd-devel] [PATCH 7/8] timesyncd: don't reset polling interval when reselecting server

2014-08-27 Thread Miroslav Lichvar
--- src/timesync/timesyncd-manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c index 9f12149..d1f77a8 100644 --- a/src/timesync/timesyncd-manager.c +++ b/src/timesync/timesyncd-manager.c @@ -735,7 +735,

Re: [systemd-devel] [BUG] time-sync.target reached prematurely

2014-08-27 Thread Miroslav Lichvar
ould never delay the boot by default for > external conditions, such as network connectivity. hence, by default > waiting for a network interface before we finish boot, and even waiting > for a way to connect to an NTP server is not OK. What services with dependency on the target do we use by

Re: [systemd-devel] [PATCH] timedated: add configure option to set name of controlled NTP service

2014-08-27 Thread Miroslav Lichvar
rift through when network is congested, ability to deal with broken clocks (as in some virtual machines) and monotonic time just for a super fast update seems like a bad choice to me. I'm sure timesyncd will be significantly improved over time, but currently I'd not describe it as "mor

Re: [systemd-devel] [PATCH] timedated: add configure option to set name of controlled NTP service

2014-08-26 Thread Miroslav Lichvar
nd actual > consumer products. Ok, how exactly are you feeding the NTP client? Perhaps it's something we could use in chronyd too. -- Miroslav Lichvar ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] [PATCH] timedated: add configure option to set name of controlled NTP service

2014-08-26 Thread Miroslav Lichvar
On Tue, Aug 26, 2014 at 02:21:10PM +0200, Lennart Poettering wrote: > On Tue, 26.08.14 11:41, Miroslav Lichvar (mlich...@redhat.com) wrote: > > To have timedated/timedatectl managing the right NTP service on > > distributions like Fedora. > > I don't really think that

Re: [systemd-devel] [PATCH] timedated: add configure option to set name of controlled NTP service

2014-08-26 Thread Miroslav Lichvar
On Tue, Aug 26, 2014 at 03:27:10AM +0200, Lennart Poettering wrote: > On Thu, 21.08.14 12:49, Miroslav Lichvar (mlich...@redhat.com) wrote: > > > This is useful for installations where some other service than > > systemd-timesyncd is used to synchronize the system clock. > &

Re: [systemd-devel] timesyncd: Frequent polling when no server could be reached

2014-08-22 Thread Miroslav Lichvar
lect it for timedated. In 216 the ntp-units.d directory is ignored and timedated always controls timesyncd. I think it would be nice if this was configurable at least at compile time and I sent a patch for that yesterday. -- Miroslav Lichvar ___ systemd-deve

[systemd-devel] [PATCH] timedated: add configure option to set name of controlled NTP service

2014-08-21 Thread Miroslav Lichvar
This is useful for installations where some other service than systemd-timesyncd is used to synchronize the system clock. --- configure.ac | 9 + src/timedate/timedated.c | 10 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.