The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Alexander Gordeev <lasaine@lvk.cs.msu.su>
To: john stultz <johnstul@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, linuxpps@ml.enneenne.com,
	"Nikita V. Youshchenko" <yoush@cs.msu.su>,
	stas@lvk.cs.msu.su, Rodolfo Giometti <giometti@enneenne.com>,
	Rodolfo Giometti <giometti@linux.it>,
	Andrew Morton <akpm@linux-foundation.org>,
	"William S. Brasher" <billb958@door.net>,
	Reg Clemens <clemens@dwf.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Thomas Gleixner <tglx@linutronix.de>,
	Mauro Carvalho Chehab <mchehab@redhat.com>,
	Ingo Molnar <mingo@elte.hu>,
	"H. Peter Anvin" <hpa@linux.intel.com>,
	John Kacur <jkacur@redhat.com>
Subject: Re: [PATCH 2/5] pps: capture MONOTONIC_RAW timestamps as well
Date: Thu, 4 Feb 2010 14:05:22 +0300	[thread overview]
Message-ID: <20100204140522.42330436@desktopvm.lvknet> (raw)
In-Reply-To: <1265235976.3255.67.camel@work-vm>

[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]

В Wed, 03 Feb 2010 14:26:16 -0800
john stultz <johnstul@us.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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 489 bytes --]

  reply	other threads:[~2010-02-04 11:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-03 20:56 [PATCH 0/5] pps: time synchronization over LPT Alexander Gordeev
2010-02-03 20:56 ` [PATCH 1/5] ntp: add hardpps implementation Alexander Gordeev
2010-02-03 22:08   ` john stultz
2010-02-03 23:51     ` Alexander Gordeev
2010-02-03 20:56 ` [PATCH 2/5] pps: capture MONOTONIC_RAW timestamps as well Alexander Gordeev
2010-02-03 22:26   ` john stultz
2010-02-04 11:05     ` Alexander Gordeev [this message]
2010-02-03 20:56 ` [PATCH 3/5] pps: add kernel consumer support Alexander Gordeev
2010-02-03 20:56 ` [PATCH 4/5] pps: add parallel port PPS signal generator Alexander Gordeev
2010-02-05 10:39   ` Rodolfo Giometti
2010-02-06  8:57     ` [LinuxPPS] " Alexander Gordeev
2010-02-03 20:56 ` [PATCH 5/5] pps: add parallel port PPS client Alexander Gordeev

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=20100204140522.42330436@desktopvm.lvknet \
    --to=lasaine@lvk.cs.msu.su \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=billb958@door.net \
    --cc=clemens@dwf.com \
    --cc=giometti@enneenne.com \
    --cc=giometti@linux.it \
    --cc=hpa@linux.intel.com \
    --cc=jkacur@redhat.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxpps@ml.enneenne.com \
    --cc=mchehab@redhat.com \
    --cc=mingo@elte.hu \
    --cc=stas@lvk.cs.msu.su \
    --cc=tglx@linutronix.de \
    --cc=yoush@cs.msu.su \
    /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