[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <703440af-031c-16b5-c1ff-54fb4bb5e10c@gmail.com>
Date: Tue, 7 Apr 2020 15:24:13 +0200
From: "Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>
To: Andrey Vagin <avagin@...nvz.org>, Dmitry Safonov <dima@...sta.com>
Cc: mtk.manpages@...il.com, Linux API <linux-api@...r.kernel.org>,
lkml <linux-kernel@...r.kernel.org>,
Containers <containers@...ts.linux-foundation.org>,
Christian Brauner <christian@...uner.io>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Dmitry Safonov <0x7f454c46@...il.com>,
Andrey Vagin <avagin@...nvz.org>,
Adrian Reber <adrian@...as.de>,
Thomas Gleixner <tglx@...utronix.de>,
Andy Lutomirski <luto@...nel.org>
Subject: A further though on /proc/PID/timens_offsets
Hello Dmitry, Andrei,
Quoting the draft time_namespaces manual page:
Associated with each time namespace are offsets, expressed with
respect to the initial time namespace, that define the values of
the monotonic and boot-time clocks in that namespace. These off‐
sets are exposed via the file /proc/PID/timens_offsets. Within
this file, the offsets are expressed as lines consisting of three
space-delimited fields:
<clock-id> <offset-secs> <offset-nanosecs>
The clock-id identifies the clock whose offsets are being shown.
This field is either 1, for CLOCK_MONOTONIC, or 7, for CLOCK_BOOT‐
TIME.
What was the reason for exposing numeric clock IDs in the
timens_offsets file? In API terms, that seems a little ugly.
I think it would have been much nicer if the clocks were defined
symbolically in this file. I.e., that reading the file would have
shown something like
monotonic x y
boottime x y
And that records similarly with symbolic clock names could have
been written to the file. Was there a reason not to do this?
Thanks,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
Powered by blists - more mailing lists