linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Gordeev <lasaine@lvk.cs.msu.su>
To: linux-kernel@vger.kernel.org
Cc: "Nikita V\. Youshchenko" <yoush@cs.msu.su>,
	linuxpps@ml.enneenne.com,
	Rodolfo Giometti <giometti@enneenne.com>,
	john stultz <johnstul@us.ibm.com>,
	Alexander Gordeev <lasaine@lvk.cs.msu.su>
Subject: [PATCHv3 00/16] pps: several fixes and improvements
Date: Thu,  5 Aug 2010 01:06:37 +0400	[thread overview]
Message-ID: <cover.1280952801.git.lasaine@lvk.cs.msu.su> (raw)

This patchset contains several changes that improve an overall
design/performance of PPS subsystem. I'd like these patches to be
merged mainline if no one objects.

Patches 1-3 are bugfixes.
Patches 4-11 are other improvements to PPS subsystem.
Patches 12-14 add kernel consumer support.
Patch 15 adds parallel port PPS client.
Patch 16 adds parallel port PPS generator.

You can find description for my previous patchset (it describes patches
12-16 in more detailed) here: http://lkml.org/lkml/2010/2/24/189

This patchset is tested against the vanilla 2.6.35 kernel. But we are
actually using it on 2.6.33.7-rt29 rt-preempt kernel most of the time.
Those who are interested in other versions of the patchset can find
them in my git repository:
git://github.com/ago/linux-2.6.git

There is one problem however: kernel consumer works bad (if enabled)
when CONFIG_NO_HZ is enabled. The reason for this is commit
a092ff0f90cae22b2ac8028ecd2c6f6c1a9e4601. Without it hardpps() is able
to sync to 1us precision in about 10 seconds. With CONFIG_NO_HZ it is
not syncing at all. This only affects patches 12-14, others are ok.

2John Stultz: the problem is not with logarithmic accumulation because
it works good if NTP_INTERVAL_FREQ is set to 2.

Changelog
v2 -> v3:
 * add patches 1-11
 * add clear_wait parameter to pps_parport
 * add delay parameter to pps_gen_parport
 * fix seqlock unlocking
 * fix issues pointed out by Rodolfo Giometti:
   * move CONFIG_NTP_PPS to drivers/pps/Kconfig
   * swap parport client and generator patches
   * style and typo fixes
 * move patch that adds unified timestamp gathering to be the beginning

v1 -> v2:
 * fix issues pointed out by John Stultz:
   * style fixes
   * add a about the authorship of the original code
   * replace timespec with pps_normtime struct where timespec is used
     in a wrong way
   * fix seqlock usage in hardpps()
 * unbind kernel consumer on device removal
 * send raw timestamp instead of the last difference to hardpps() which
   simplifies the code and is less error-prone
 * update comments in the kernel consumer code to match the reality
 * split the patch that adds MONOTONIC_RAW timestmaps into two
 * other small fixes

Alexander Gordeev (16):
  pps: trivial fixes
  pps: declare variables where they are used in switch
  pps: fix race in PPS_FETCH handler
  pps: unify timestamp gathering
  pps: access pps device by direct pointer
  pps: convert printk/pr_* to dev_*
  pps: move idr stuff to pps.c
  pps: add async PPS event handler
  pps: don't disable interrupts when using spin locks
  pps: use BUG_ON for kernel API safety checks
  pps: simplify conditions a bit
  ntp: add hardpps implementation
  pps: capture MONOTONIC_RAW timestamps as well
  pps: add kernel consumer support
  pps: add parallel port PPS client
  pps: add parallel port PPS signal generator

 Documentation/ioctl/ioctl-number.txt     |    2 +-
 drivers/pps/Kconfig                      |   10 +
 drivers/pps/Makefile                     |    2 +-
 drivers/pps/clients/Kconfig              |    7 +
 drivers/pps/clients/Makefile             |    1 +
 drivers/pps/clients/pps-ktimer.c         |   43 ++--
 drivers/pps/clients/pps-ldisc.c          |   49 ++--
 drivers/pps/clients/pps_parport.c        |  244 +++++++++++++++++
 drivers/pps/generators/Kconfig           |   17 ++
 drivers/pps/generators/Makefile          |    9 +
 drivers/pps/generators/pps_gen_parport.c |  274 +++++++++++++++++++
 drivers/pps/kapi.c                       |  330 +++++++++++-------------
 drivers/pps/pps.c                        |  201 +++++++++++---
 include/linux/pps.h                      |    7 +
 include/linux/pps_kernel.h               |   64 ++++-
 include/linux/serial_core.h              |    5 +-
 include/linux/time.h                     |    2 +
 include/linux/timex.h                    |    1 +
 include/linux/tty_ldisc.h                |    5 +-
 kernel/time/ntp.c                        |  421 ++++++++++++++++++++++++++++-
 kernel/time/timekeeping.c                |   34 +++
 21 files changed, 1419 insertions(+), 309 deletions(-)
 create mode 100644 drivers/pps/clients/pps_parport.c
 create mode 100644 drivers/pps/generators/Kconfig
 create mode 100644 drivers/pps/generators/Makefile
 create mode 100644 drivers/pps/generators/pps_gen_parport.c


             reply	other threads:[~2010-08-04 21:14 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-04 21:06 Alexander Gordeev [this message]
2010-08-04 21:06 ` [PATCHv3 01/16] pps: trivial fixes Alexander Gordeev
2010-08-05  8:57   ` Rodolfo Giometti
2010-08-04 21:06 ` [PATCHv3 02/16] pps: declare variables where they are used in switch Alexander Gordeev
2010-08-05  9:05   ` Rodolfo Giometti
2010-08-04 21:06 ` [PATCHv3 03/16] pps: fix race in PPS_FETCH handler Alexander Gordeev
2010-08-05  5:19   ` Vitezslav Samel
2010-08-05 10:19     ` Alexander Gordeev
2010-08-05 11:07       ` Vitezslav Samel
2010-08-05 14:31         ` Alexander Gordeev
2010-08-05  9:15   ` Rodolfo Giometti
2010-08-04 21:06 ` [PATCHv3 04/16] pps: unify timestamp gathering Alexander Gordeev
2010-08-05  9:17   ` Rodolfo Giometti
2010-08-04 21:06 ` [PATCHv3 05/16] pps: access pps device by direct pointer Alexander Gordeev
2010-08-05  9:32   ` Rodolfo Giometti
2010-08-05 11:42     ` Alexander Gordeev
2010-08-05 12:31       ` Rodolfo Giometti
2010-08-09  7:53         ` Alexander Gordeev
2010-08-09 12:47           ` Rodolfo Giometti
2010-08-04 21:06 ` [PATCHv3 06/16] pps: convert printk/pr_* to dev_* Alexander Gordeev
2010-08-04 21:06 ` [PATCHv3 07/16] pps: move idr stuff to pps.c Alexander Gordeev
2010-08-04 21:06 ` [PATCHv3 08/16] pps: add async PPS event handler Alexander Gordeev
2010-08-04 21:06 ` [PATCHv3 09/16] pps: don't disable interrupts when using spin locks Alexander Gordeev
2010-08-04 21:06 ` [PATCHv3 10/16] pps: use BUG_ON for kernel API safety checks Alexander Gordeev
2010-08-04 21:06 ` [PATCHv3 11/16] pps: simplify conditions a bit Alexander Gordeev
2010-08-04 21:06 ` [PATCHv3 12/16] ntp: add hardpps implementation Alexander Gordeev
2010-08-04 22:49   ` john stultz
2010-08-05 12:00     ` Alexander Gordeev
2010-08-04 23:26   ` Andrew Morton
2010-08-04 23:39     ` David Daney
2010-08-04 23:49       ` Andrew Morton
2010-08-04 21:06 ` [PATCHv3 13/16] pps: capture MONOTONIC_RAW timestamps as well Alexander Gordeev
2010-08-04 23:03   ` john stultz
2010-08-05 12:16     ` Alexander Gordeev
2010-08-04 23:29   ` Andrew Morton
2010-08-05 12:29     ` Alexander Gordeev
2010-08-04 21:06 ` [PATCHv3 14/16] pps: add kernel consumer support Alexander Gordeev
2010-08-04 21:06 ` [PATCHv3 15/16] pps: add parallel port PPS client Alexander Gordeev
2010-08-04 23:34   ` Andrew Morton
2010-08-05 12:48     ` Alexander Gordeev
2010-08-04 21:06 ` [PATCHv3 16/16] pps: add parallel port PPS signal generator Alexander Gordeev
2010-08-04 23:38   ` Andrew Morton

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=cover.1280952801.git.lasaine@lvk.cs.msu.su \
    --to=lasaine@lvk.cs.msu.su \
    --cc=giometti@enneenne.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxpps@ml.enneenne.com \
    --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;
as well as URLs for NNTP newsgroup(s).