[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100204140522.42330436@desktopvm.lvknet>
Date: Thu, 4 Feb 2010 14:05:22 +0300
From: Alexander Gordeev <lasaine@....cs.msu.su>
To: john stultz <johnstul@...ibm.com>
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
В Wed, 03 Feb 2010 14:26:16 -0800
john stultz <johnstul@...ibm.com> пишет:
> 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?
Agreed with you completely. I don't like the approach but failed to
invent anything better.
> 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.
Well, I'd like to, but how? getnstime_raw_and_real() is used in
module added in one of the next commits.
--
Alexander
Download attachment "signature.asc" of type "application/pgp-signature" (490 bytes)
Powered by blists - more mailing lists