[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1265235976.3255.67.camel@work-vm>
Date: Wed, 03 Feb 2010 14:26:16 -0800
From: john stultz <johnstul@...ibm.com>
To: Alexander Gordeev <lasaine@....cs.msu.su>
Cc: linux-kernel@...r.kernel.org, linuxpps@...enneenne.com,
"Nikita V. Youshchenko" <yoush@...msu.su>, stas@....cs.msu.su,
Rodolfo Giometti <giometti@...eenne.com>,
Rodolfo Giometti <giometti@...ux.it>,
Andrew Morton <akpm@...ux-foundation.org>,
"William S. Brasher" <billb958@...r.net>,
Reg Clemens <clemens@....com>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Thomas Gleixner <tglx@...utronix.de>,
Mauro Carvalho Chehab <mchehab@...hat.com>,
Ingo Molnar <mingo@...e.hu>,
"H. Peter Anvin" <hpa@...ux.intel.com>,
John Kacur <jkacur@...hat.com>
Subject: Re: [PATCH 2/5] pps: capture MONOTONIC_RAW timestamps as well
On Wed, 2010-02-03 at 23:56 +0300, Alexander Gordeev wrote:
> MONOTONIC_RAW clock timestamps are ideally suited for frequency
> calculation and also fit well into the original NTP hardpps design. Now
> phase and frequency can be adjusted separately: the former based on
> REALTIME clock and the latter based on MONOTONIC_RAW clock.
> A new function getnstime_raw_and_real is added to timekeeping subsystem
> to capture both timestamps at the same time and atomically.
Hrmm. So while I understand the need for it, the
getnstime_raw_and_real() makes me cringe a little. Part of the issue is
that there are multiple CLOCK_IDs and the current interface allows for
accesses to only one at a time. There's a similar hack in the hrtimer
code to get the CLOCK_REALTIME and CLOCK_MONOTONIC values at the same
time. Next I worry that folks will want a getnstime_mono_and_raw() or a
getnstime_real_mono_and_raw(), then a getnstime_real_and_realcoarse(),
etc..
I'm almost thinking the way to handle this would be a better
abstraction, like a get_two_times(CLOCKID, timepsec*, CLOCKID,
timespec*). But that might need some further discussion. Anyone else
have thoughts here?
So yea not opposed to this patch, but maybe try to avoid exporting the
symbol, so modules don't end up using it and we can change it fairly
easily later.
thanks
-john
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists