From: Laurent Georget <laurent.georget-vbcOdlJ0SulGWvitb5QawA@public.gmane.org>
To: Richard Cochran <richardcochran-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [patch v2] adjtimex.2: add explanation about ADJ_TAI action
Date: Sat, 29 Nov 2014 00:02:33 +0100 [thread overview]
Message-ID: <5478FF09.6090508@supelec.fr> (raw)
In-Reply-To: <20141128210043.GB14432-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
Le 28/11/2014 22:00, Richard Cochran a écrit :
> On Fri, Nov 28, 2014 at 02:40:44PM +0100, Laurent Georget wrote:
>> @@ -101,7 +99,19 @@ combination of zero or more of the following bits:
>> Ordinary users are restricted to a zero value for
>> .IR modes .
>> Only the superuser may set any parameters.
>> +.PP
>> +Support for TAI (Atomic International Time, for a complete explanation
>> about
>> +what it is and what is the difference between TAI and UTC, see
>> +.UR http://www.bipm.org/en/bipm/tai/tai.html
>> +.I BIPM
>> +.UE )
>> +has been added in version 2.6.29. For any clock, the TAI offset may
>
> Not for "any clock", just for CLOCK_REALTIME.
Considering that this is the only one representing the "human" time and
supporting an adjtime action, indeed, it's not relevant for anything
else than the realtime clock.
>
>> +be calculated by adding a value to the UTC offset which is updated when a
>> +leap second is added or deleted.
>> .br
>> +All the offsets in the timex structure are expressed between the value
>> of the
>> +clock and the corresponding value (e.g. TAI offset is the difference
>> between
>> +the clock and the TAI, not between TAI and another value such as UTC).
>
> The TAI offset is just (TAI - UTC). That's all.
>
Yes, my mistake, I misunderstood the part about timekeeping
(__timekeeping_set_tai_offset() in kernel/time/timekeeping.c, line 815)
which does store the offset in several formats (monotonic -> TAI and UTC
-> TAI). But this is not directly related to the timex value. Aniway
this is not very relevant in the man page.
Thank you for your comments. Below is a new version of the patch. Less
unrelevant chit-chat, more useful information (hopefully).
diff --git a/man2/adjtimex.2 b/man2/adjtimex.2
index 20a2f0b..871e607 100644
--- a/man2/adjtimex.2
+++ b/man2/adjtimex.2
@@ -26,9 +26,6 @@
.\" Modified 2004-05-27 by Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
.\" Modified 2014-11-28 by Laurent Georget <laurent.georget-vbcOdlJ0SulGWvitb5QawA@public.gmane.org>
.\"
-.\" FIXME Document ADJ_TAI (added in Linux 2.6.26)
-.\" commit 153b5d054ac2d98ea0d86504884326b6777f683d
-.\"
.\" FIXME Document ADJ_MICRO and ADJ_NANO (added in Linux 2.6.26)
.\" commit eea83d896e318bda54be2d2770d2c5d6668d11db
.\" Author: Roman Zippel <zippel-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
@@ -74,6 +71,17 @@ struct timex {
(read-only) */
struct timeval time; /* current time (read-only) */
long tick; /* usecs between clock ticks */
+
+ long ppsfreq; /* pps frequency (scaled ppm) (read-only) */
+ long jitter; /* pps jitter (usec) (read-only) */
+ int shift; /* interval duration (sec) (read-only) */
+ long stabil; /* pps stability (scaled ppm) (read-only) */
+ long jitcnt; /* jitter limit exceeded (read-only) */
+ long calcnt; /* calibration intervals (read-only) */
+ long errcnt; /* calibration errors (read-only) */
+ long stbcnt; /* stability limit exceeded (read-only) */
+
+ int tai; /* TAI offset (s) (read-only) */
};
.fi
.in
@@ -93,6 +101,7 @@ combination of zero or more of the following bits:
#define ADJ_ESTERROR 0x0008 /* estimated time error */
#define ADJ_STATUS 0x0010 /* clock status */
#define ADJ_TIMECONST 0x0020 /* pll time constant */
+#define ADJ_TAI 0x0080 /* TAI offset */
#define ADJ_TICK 0x4000 /* tick value */
#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime() */
.fi
@@ -102,6 +111,20 @@ Ordinary users are restricted to a zero value for
.IR modes .
Only the superuser may set any parameters.
.br
+In the case of
+.BR ADJ_TAI ,
+as
+.I buf->tai
+is read-only, the new value is passed through
+.IR buf->constant .
+.PP
+Support for TAI (Atomic International Time, for a complete explanation
about
+what it is and what is the difference between TAI and UTC, see
+.UR http://www.bipm.org/en/bipm/tai/tai.html
+.I BIPM
+.UE )
+has been added in version 2.6.29.
+.br
.ne 12v
.SH RETURN VALUE
On success,
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-11-28 23:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-28 13:40 [patch] adjtimex.2: add explanation about ADJ_TAI action Laurent Georget
[not found] ` <54787B5C.1080802-vbcOdlJ0SulGWvitb5QawA@public.gmane.org>
2014-11-28 21:00 ` Richard Cochran
[not found] ` <20141128210043.GB14432-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-11-28 23:02 ` Laurent Georget [this message]
2014-11-29 9:27 ` [patch v2] " Michael Kerrisk (man-pages)
[not found] ` <54799198.1070907-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-11-29 9:46 ` Laurent Georget
[not found] ` <5478FF09.6090508-vbcOdlJ0SulGWvitb5QawA@public.gmane.org>
2014-11-29 9:32 ` Richard Cochran
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=5478FF09.6090508@supelec.fr \
--to=laurent.georget-vbcodlj0sulgwvitb5qawa@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=richardcochran-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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).