public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Epler <jepler@unpythonic.net>
To: linux-man <linux-man@vger.kernel.org>
Cc: Laurent Georget <laurent.georget@supelec.fr>,
	linux-kernel@vger.kernel.org,
	"Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>,
	Richard Cochran <richardcochran@gmail.com>
Subject: [PATCH] adjtimex: PPM scaling is by 2^-16
Date: Thu, 1 Jan 2015 20:41:20 -0600	[thread overview]
Message-ID: <20150102024118.GA8293@unpythonic.net> (raw)
In-Reply-To: <54A2DEAD.2050708@supelec.fr>

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
---
Like Laurent Georget, I found by reading ntpd source
the scale is 2^16 (i.e., 1 ~= 1.5e-5 ppm, 65536 = 1ppm)

Perhaps a wording like the following is suitable.

 man2/adjtimex.2 | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/man2/adjtimex.2 b/man2/adjtimex.2
index 4b558b7..118908a 100644
--- a/man2/adjtimex.2
+++ b/man2/adjtimex.2
@@ -54,9 +54,8 @@ struct timex {
     long offset;      /* Time offset; nanoseconds, if STA_NANO
                          status flag is set, otherwise
                          microseconds */
-    long freq;        /* Frequency offset, as scaled PPM
+    long freq;        /* Frequency offset, in units of 2^-16 PPM
                          (parts per million) */
-.\" FIXME What is the scaling unit of timex.freq?  2^16 ?
     long maxerror;    /* Maximum error (microseconds) */
     long esterror;    /* Estimated error (microseconds) */
     int  status;      /* Clock command/status */
@@ -72,13 +71,13 @@ struct timex {
                          flag is set, otherwise microseconds */
     long tick;        /* Microseconds between clock ticks */
     long ppsfreq;     /* PPS (pulse per second) frequency
-                         (scaled PPM, read-only) */
+                         (2^-16 PPM, read-only) */
     long jitter;      /* PPS jitter (read-only); nanoseconds, if
                          STA_NANO status flag is set, otherwise
                          microseconds */
     int  shift;       /* PPS interval duration
                          (seconds, read-only) */
-    long stabil;      /* PPS stability (scaled PPM, read-only) */
+    long stabil;      /* PPS stability (2^-16 PPM, read-only) */
     long jitcnt;      /* PPS jitter limit exceeded (read-only) */
     long calcnt;      /* PPS calibration intervals (read-only) */
     long errcnt;      /* PPS calibration errors (read-only) */
-- 
2.1.4

  parent reply	other threads:[~2015-01-02  3:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-30 17:19 [PATCH] adjtimex.2: Add details about ADJ_FREQUENCY Laurent Georget
2014-12-30 18:05 ` Richard Cochran
2014-12-30 18:47   ` Laurent Georget
2015-01-02  2:41 ` Jeff Epler [this message]
2015-01-02  6:29   ` [PATCH] adjtimex: PPM scaling is by 2^-16 Richard Cochran
2015-01-02 16:39     ` Laurent Georget
2015-01-02 18:51       ` Richard Cochran
2015-01-02 21:15       ` Jeff Epler
2015-01-02 22:48         ` Laurent Georget
2015-01-02 23:01 ` [PATCH 1/2] adjtimex.2: Clarify the 'ppm scaling' used in struct timex Laurent Georget
2015-01-02 23:07   ` [PATCH 2/2] adjtimex.2: Change 'PPM' (parts per million) to 'ppm' Laurent Georget
2015-01-06 15:20     ` Michael Kerrisk (man-pages)
2015-01-06 15:19   ` [PATCH 1/2] adjtimex.2: Clarify the 'ppm scaling' used in struct timex Michael Kerrisk (man-pages)

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=20150102024118.GA8293@unpythonic.net \
    --to=jepler@unpythonic.net \
    --cc=laurent.georget@supelec.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=richardcochran@gmail.com \
    /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