Thread (28 messages) 28 messages, 7 authors, 2017-11-30
STALE3121d

[PATCH] rtc: Allow rtc drivers to specify the tv_nsec value for ntp

From: J William Piggott <hidden>
Date: 2017-11-24 00:13:58
Also in: linux-rtc


On 11/23/2017 07:53 AM, Russell King - ARM Linux wrote:
On Thu, Nov 23, 2017 at 01:04:51PM +0100, Alexandre Belloni wrote:
quoted
 8<
quoted
But nothing prevents you from using hwclock every 11 minutes from
userspace. I really don't think this should be done from the kernel.
It's not just about running hwclock every 11 minutes.  It's about
running hwclock when NTP sync'd.  If the local clock is not sync'd
you don't want to be running hwclock, especially if you've trimmed
the RTC.  So merely throwing hwclock -uw into a cron job really
doesn't solve it.

A way around that would be to install adjtimex, so that the kernel's
NTP flags can be read out.  However, that comes with its own set of
problems.

On Debian, installing adjtimex will disrupt the timekeeping because
of the post-install scripts debian runs.  It seems Debian assumes
that if you install something, it has the right to modify the system
timekeeping parameters immediately, screwing up ntpd in the process,
if it's running.  The thought that you're installing adjtimex because
you want to _inspect_ the kernel ntp parameters is not one that
Debian folk appear to have considered as being a reason for installing
the package.
IMO, adjtimex is broken anyway. Use ntptime, it should be included
in the ntp package:

 $ /usr/sbin/ntptime | grep status
  status 0x40 (UNSYNC),

'ntptime -f ppm' allows correcting the system clock. So adjtimex really
isn't needed anymore.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help