linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* A further though on /proc/PID/timens_offsets
@ 2020-04-07 13:24 Michael Kerrisk (man-pages)
  2020-04-09 19:17 ` Andrey Vagin
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-04-07 13:24 UTC (permalink / raw)
  To: Andrey Vagin, Dmitry Safonov
  Cc: mtk.manpages, Linux API, lkml, Containers, Christian Brauner,
	Eric W. Biederman, Dmitry Safonov, Andrey Vagin, Adrian Reber,
	Thomas Gleixner, Andy Lutomirski

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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-10  5:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-07 13:24 A further though on /proc/PID/timens_offsets Michael Kerrisk (man-pages)
2020-04-09 19:17 ` Andrey Vagin
2020-04-09 21:32   ` Eric W. Biederman
2020-04-10  5:23     ` Andrey Vagin
2020-04-10  5:27       ` Michael Kerrisk (man-pages)

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).