[LinuxPPS] kernel consumer implementation

Alexander Gordeev lasaine at lvk.cs.msu.su
Thu Oct 1 22:11:52 CEST 2009


Hi All,

I'm currently working on subj. My implementation is doing the job well
already. It is against 2.6.29.6 kernel. I'll post the current
implementation in reply to this leeter but remember that it is not
finished yet.

Things I already done:
 * made a control interface for the user-space through
   time_pps_kcbind()->ioctl->ioctl handler in pps.c
 * added a function to the timekeeping subsystem to capture both
   REALTIME and MONOTONIC_RAW clocks timestamps at the same time and
   atomically. From the commit log:
   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.
 * added a simple hardpps function and modified pps_event
   appropriately. It should be moved to kernel/time/ntp.c finally.

There is still some work to be done:
 * port it to the new 2.6.31 kernel with the new patchset from Rodolfo
   applied
 * handle STA_PPS* properly and report PPS-related variables properly
   to make ntpd happy
 * optionally add some median filters and other such stuff to the
   hardpps function (I have a very simple hardpps function currently)
 * push it for inclusion into LinuxPPS tree and even mainline :)

Please feel free to comment on the patches! My primary goal is to
get your opinions on the second patch which adds MONOTONIC_RAW
timestamps.

-- 
  Alexander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
Url : http://ml.enneenne.com/pipermail/linuxpps/attachments/20091002/4f56f88d/attachment.pgp 


More information about the LinuxPPS mailing list