Re: [PATCH 2/3] ntp: add ADJ_SETOFFSET mode bit
From: John Stultz
Date: Tue Jan 04 2011 - 14:14:25 EST
On Tue, 2011-01-04 at 09:40 +0100, Richard Cochran wrote:
> On Mon, Jan 03, 2011 at 12:44:26PM -0800, John Stultz wrote:
> > Richard: Maybe this is a good thing to think about for clock_adjtime? If
> > we are adding a new syscall, maybe we should make sure we clean up some
> > of the old syscalls issues? It does add a good bit of complexity, as the
> > idea of clock_adjtime being a multiplexing adjtimex was nice and simple.
> > We'd also have to review the mode usage to see if multi-mode adjustments
> > in a single call are all that common or not.
> So, is the NTP source code the documentation of the kernel interface?
Yea. adjtimex is a combination of ntp_adjtime and the older adjtime
interfaces. So its not identical to David Mill's design, but it is
compatible. In fact, it wasn't until somewhat recently that it picked
up the ntpv4 changes and MOD/ADJ_NANO.
By the way, I'm not saying we should switch from using mode flags to
mode numbers for the new interface as I'm not sure if it would confuse
users moving to it (being very similar, but slightly different can be
worse then being totally different). But I figure it warrants some
consideration. We do still have 4 unused bits in the modes flags after
your patch, so this may be a premature worry.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/