[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ntp and hwclock



On Tue, Jan 23, 2007 at 03:12:45PM -0200, Henrique de Moraes Holschuh wrote:
> On Tue, 23 Jan 2007, Ken Heard wrote:
> > >Linux kernel updates CMOS (hardware clock) time every 11 minutes.
> 
> Only when in ntp sync mode, AFAIK.  Maybe the new RTC class lets one change
> this easily, but then the "CMOS RTC" port to the new RTC class ain't in
> Linux mainline yet.

I think this is default, and it is not depend on new RTC subsystem,
introduced in 2.6.16. There are plans to move all clock sync logic to
userspace, but that are only plans.

Try to not to run /etc/init.d/hwclock*.sh on startup, and you will see,
that in-kernel clock is set up.

> > >In-kernel clock, that uses various CPU/Chipset hardware and is stable
> > >enough. Its precision is as good as CPU frequency high (mostly). Any big
> > >drift may be caused by bugs in the kernel, low precision of CMOS while
> > >computer is powered off.
> 
> Plus low stability on the kernel clock sources in the presence of cpu freq
> changes, sleep to ram or to disk, spread-spectrum clock modulation, and general bogon activity.

kernel + hardware bugs.

> No.  On a standard consumer peecee(snort!), you will really need ntpdate to
> be sure the clock is not set to anything dumb during system bootstrap, and
> if you really need clock stability for real, a proper ntp setup (which is a
> lot more than just ntpd running!) is also a requirement.

I think, without bugs this is not needed, unless you need very big
precision.

I have set up clock in my Ericsson mobile phone more than 3 years ago. If
drift exists, it is less that one second, after all.

____



Reply to: