From: john stultz <johnstul@us.ibm.com>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
George Anzinger <george@mvista.com>,
frank@tuxrocks.com, Anton Blanchard <anton@samba.org>,
benh@kernel.crashing.org, Nishanth Aravamudan <nacc@us.ibm.com>
Subject: Re: [RFC - 0/12] NTP cleanup work (v. B4)
Date: Mon, 25 Jul 2005 18:03:17 -0700 [thread overview]
Message-ID: <1122339797.30963.48.camel@cog.beaverton.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0507210151570.3728@scrub.home>
On Thu, 2005-07-21 at 12:39 +0200, Roman Zippel wrote:
> Hi,
>
> On Wed, 20 Jul 2005, john stultz wrote:
>
> > I really don't think the NTP changes I've mailed is very complex.
> > Please, be specific and point to something you think is an issue and
> > I'll do my best to fix it.
>
> Maybe I should explain, in what direction I would take it.
> Let's first only take tick based updates, one property I don't want to see
> go away (and which you remove in the last patch), is to basically update
> xtime at every tick by (tick_nsec+time_adj) (and maybe fold time_adjust
> into time_adj), no multiply/divide just adds/shifts. Every second (or
> maybe even less frequently) we update time_adj, where we even might
> integrate a better to way to add previous errors due to SHIFT_HZ.
Hmm. Ok, would something like ntp_static_interval_adjustment() or
whatnot be a decent interface to provide a fixed single tick adjustment
as precalculated by the NTP state machine? Similar to what I have in
patch 10, but via a separate interface?
> To add support for continous time sources, the generic ntp code would just
> provide [tick,frequency,offset] values and the time source converts it
> into its internal values. A tick based source calculates [tick_nsec,
> time_adj] and a continous source calculates the [offset,multiplier]. These
> values should be recalculated as infrequently as possible and not every
> single tick as you do with ppc_adjtimex. This also means a continous
> source updates xtime basically by calling gettimeofday (what ppc64 already
> almost does) and doesn't use update_wall_time() at all.
Yep, that sounds doable. Although yes, the ppc_adjtimex is more
overhead, I went with the worse implementation to scratch out my idea
adn see if the ppc folks might scream and suggest the proper way.
> Maybe I'm missing something, but I don't see a reason to forcibly merge
> both ways to update the clock, keep them seperate and let the generic ntp
> code provide the basic parameters which the time source uses to update the
> clock. The important thing is to precalculate as much as possible, so that
> the runtime overhead is as low as possible and these precalculations
> differ between time sources, so what your patches basically do is to
> remove all of these precalculations and I can't convince myself to see
> this as a good thing.
I don't know if that's the case. I am precalculating things, but maybe
we're misunderstanding each other. Regardless, yes, for the tick based
systems that can't go continuous I can preserve the existing behavior
(if not possibly improve it some).
> BTW do you have any user space test code for this? This might be useful to
> verify that the changes are really correct and a prototype might be a good
> way to demonstrate the kernel changes.
I do not right now, after seeing Rusty's talk at OLS this sounds like
quite a nice idea. I was thinking of a simple simulator that has two
files: the first a list of hardware time values and and the second a
list of operations (gettimeofday, timer_interrupt, adjtimex). We can
then generate time sequences and action sequences and run them through
the simulator of both the current and old implementations.
Not that this is completely trivial to do, but it did seem like a good
idea. I'll see what I can do.
thanks
-john
prev parent reply other threads:[~2005-07-26 1:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-16 2:55 john stultz
2005-07-16 2:57 ` [RFC][PATCH - 1/12] NTP cleanup: Move NTP code into ntp.c john stultz
2005-07-16 2:57 ` [RFC][PATCH - 2/12] NTP cleanup: Move arches to new ntp interfaces john stultz
2005-07-16 2:58 ` [RFC][PATCH - 3/12] NTP cleanup: Remove unused NTP PPS code john stultz
2005-07-16 2:59 ` [RFC][PATCH - 4/12] NTP cleanup: Breakup ntp_adjtimex() john stultz
2005-07-16 3:00 ` [RFC][PATCH - 5/12] NTP cleanup: Break out leapsecond processing john stultz
2005-07-16 3:02 ` [RFC][PATCH - 6/12] NTP cleanup: Clean up ntp_adjtimex() arguement checking john stultz
2005-07-16 3:04 ` [RFC][PATCH - 7/12] NTP cleanup: Cleanup signed shifting logic john stultz
2005-07-16 3:05 ` [RFC][PATCH - 8/12] NTP cleanup: Integrate second_overflow() logic john stultz
2005-07-16 3:06 ` [RFC][PATCH - 9/12] NTP cleanup: Improve NTP variable names john stultz
2005-07-16 3:06 ` [RFC][PATCH - 10/12] NTP cleanup: Use ntp_lock instead of xtime_lock john stultz
2005-07-16 3:07 ` [RFC][PATCH - 11/12] NTP cleanup: Introduce PPM adjustment variables john stultz
2005-07-16 3:09 ` [RFC][PATCH - 12/12] NTP cleanup: use ppm instead of unit adj returned by ntp_advance john stultz
2005-07-18 11:42 ` [RFC][PATCH - 1/12] NTP cleanup: Move NTP code into ntp.c Pavel Machek
2005-07-20 20:44 ` john stultz
2005-07-17 18:00 ` [RFC - 0/12] NTP cleanup work (v. B4) Roman Zippel
2005-07-20 16:26 ` john stultz
2005-07-21 10:39 ` Roman Zippel
2005-07-26 1:03 ` john stultz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1122339797.30963.48.camel@cog.beaverton.ibm.com \
--to=johnstul@us.ibm.com \
--cc=anton@samba.org \
--cc=benh@kernel.crashing.org \
--cc=frank@tuxrocks.com \
--cc=george@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nacc@us.ibm.com \
--cc=zippel@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®