All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Gordeev <lasaine@lvk.cs.msu.su>
To: Rodolfo Giometti <giometti@enneenne.com>
Cc: linux-kernel@vger.kernel.org, linuxpps@ml.enneenne.com,
	"Nikita V. Youshchenko" <yoush@cs.msu.su>,
	stas@lvk.cs.msu.su, john stultz <johnstul@us.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>, Ingo Molnar <mingo@elte.hu>,
	Bernhard Schiffner <bernhard@schiffner-limbach.de>,
	Rik van Riel <riel@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: Re: [PATCHv2 1/6] ntp: add hardpps implementation
Date: Mon, 1 Mar 2010 13:43:08 +0300	[thread overview]
Message-ID: <20100301134308.4f39061a@desktopvm.lvknet> (raw)
In-Reply-To: <20100301081458.GG3671@enneenne.com>

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

On Mon, 1 Mar 2010 09:14:59 +0100
Rodolfo Giometti <giometti@enneenne.com> wrote:

> On Wed, Feb 24, 2010 at 03:28:12PM +0300, Alexander Gordeev wrote:
> > This commit adds hardpps() implementation based upon the original one
> > from the NTPv4 reference kernel code from David Mills. However, it is
> > highly optimized towards very fast syncronization and maximum stickness
> > to PPS signal. The typical error is less then a microsecond.
> > To make it sync faster I had to throw away exponential phase filter so
> > that the full phase offset is corrected immediately. Then I also had to
> > throw away median phase filter because it gives a bigger error itself
> > if used without exponential filter.
> > Maybe we will find an appropriate filtering scheme in the future but
> > it's not necessary if the signal quality is ok.
> > 
> > Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su>
> > ---
> >  drivers/pps/Kconfig   |    1 +
> >  include/linux/timex.h |    1 +
> >  kernel/time/Kconfig   |    7 +
> >  kernel/time/ntp.c     |  420 +++++++++++++++++++++++++++++++++++++++++++++++--
> >  4 files changed, 414 insertions(+), 15 deletions(-)
> > 
> > diff --git a/drivers/pps/Kconfig b/drivers/pps/Kconfig
> > index cc2eb8e..2bd4f65 100644
> > --- a/drivers/pps/Kconfig
> > +++ b/drivers/pps/Kconfig
> > @@ -7,6 +7,7 @@ menu "PPS support"
> >  config PPS
> >  	tristate "PPS support"
> >  	depends on EXPERIMENTAL
> > +	select NTP_PPS
> >  	---help---
> >  	  PPS (Pulse Per Second) is a special pulse provided by some GPS
> >  	  antennae. Userland can use it to get a high-precision time
> > diff --git a/include/linux/timex.h b/include/linux/timex.h
> > index e6967d1..5a93cd3 100644
> > --- a/include/linux/timex.h
> > +++ b/include/linux/timex.h
> > @@ -274,6 +274,7 @@ extern u64 tick_length;
> >  extern void second_overflow(void);
> >  extern void update_ntp_one_tick(void);
> >  extern int do_adjtimex(struct timex *);
> > +extern void hardpps(const struct timespec *, const struct timespec *);
> >  
> >  /* Don't use! Compatibility define for existing users. */
> >  #define tickadj	(500/HZ ? : 1)
> > diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig
> > index 95ed429..2da4900 100644
> > --- a/kernel/time/Kconfig
> > +++ b/kernel/time/Kconfig
> > @@ -27,3 +27,10 @@ config GENERIC_CLOCKEVENTS_BUILD
> >  	default y
> >  	depends on GENERIC_CLOCKEVENTS || GENERIC_CLOCKEVENTS_MIGR
> >  
> > +config NTP_PPS
> > +	bool "PPS kernel consumer support"
> > +	depends on PPS
> > +	help
> > +	  This option adds support for direct in-kernel time
> > +	  syncronization using an external PPS signal.
> > +
> 
> This patch is both PPS and NTP related but I suppose is better moving
> this setting into drivers/pps directory since people whose want to use
> thise supports can go into same place and find whetever they want...

OK, I don't mind moving it. In fact I don't remember why I put it
here. :)
Thanks for the note!

-- 
  Alexander

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

  reply	other threads:[~2010-03-01 10:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-24 12:28 [PATCHv2 0/6] pps: time synchronization over LPT Alexander Gordeev
2010-02-24 12:28 ` [PATCHv2 1/6] ntp: add hardpps implementation Alexander Gordeev
2010-03-01  8:14   ` Rodolfo Giometti
2010-03-01 10:43     ` Alexander Gordeev [this message]
2010-02-24 12:28 ` [PATCHv2 2/6] pps: unify timestamp gathering Alexander Gordeev
2010-03-01  8:18   ` Rodolfo Giometti
2010-02-24 12:28 ` [PATCHv2 3/6] pps: capture MONOTONIC_RAW timestamps as well Alexander Gordeev
2010-03-01  8:19   ` Rodolfo Giometti
2010-02-24 12:28 ` [PATCHv2 4/6] pps: add kernel consumer support Alexander Gordeev
2010-03-01  8:29   ` Rodolfo Giometti
2010-03-01 10:48     ` Alexander Gordeev
2010-02-24 12:28 ` [PATCHv2 5/6] pps: add parallel port PPS signal generator Alexander Gordeev
2010-03-01  8:38   ` Rodolfo Giometti
2010-03-01 10:51     ` Alexander Gordeev
2010-02-24 12:28 ` [PATCHv2 6/6] pps: add parallel port PPS client Alexander Gordeev
2010-03-01  8:42   ` Rodolfo Giometti
2010-03-09  3:25 ` [PATCHv2 0/6] pps: time synchronization over LPT john stultz
2010-03-22 20:42   ` Alexander Gordeev
2010-03-22 21:01     ` john stultz
2010-03-22 21:37       ` 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=20100301134308.4f39061a@desktopvm.lvknet \
    --to=lasaine@lvk.cs.msu.su \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bernhard@schiffner-limbach.de \
    --cc=giometti@enneenne.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxpps@ml.enneenne.com \
    --cc=mingo@elte.hu \
    --cc=riel@redhat.com \
    --cc=schwidefsky@de.ibm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.