From: scs+lkml@eskimo.com (Steve Summit)
To: linux-kernel@vger.kernel.org
Subject: timekeeping documentation?
Date: Wed, 25 Jan 2017 07:27:12 -0500 [thread overview]
Message-ID: <2017Jan25.0727.scs.0001@eskimo.com> (raw)
Does anyone know of any good documentation about what goes
on in kernel/time/timekeeping.c? I know about the file
Documentation/timers/timekeeping.txt, but that's mostly talking
about underlying clock sources.
The documentation I'm looking for would answer questions such as:
* How is is the kernel's primary wallclock time (xtime) defined?
* How are other clocks (boot, monotonic, etc.) derived from xtime?
* What is ktime_t and how does it differ from time_t?
* What are the invariants involving the timekeeper offsets
wall_to_monotonic, offs_real, offs_boot, and offs_tai?
* What is the distinction between the regular and the "coarse" clocks?
(And what about the "raw" and "alarm" clocks?)
* What are the timekeeper "base" variables tkr_mono and tkr_raw?
How are they used, and what are the invariants surrounding them?
* Which of the functions in timekeeping.c are called at interrupt time?
* What are the locking requirements surrounding the timekeeper
data structures?
* What are the main, suggested, primary calls for fetching the
current time? (What about setting it?)
* What is the separation of functionality between time.c,
timekeeping.c, posix-timers.c, and ntp.c?
* What abstractions are intended to be imposed by the inline
functions defined in timekeeping.h (current_kernel_time(), etc.)?
* How much of this is historical and/or accidental, and what (if any)
cleanups and/or improvements to the timekeeping architecture
might be in the works?
If there's no such documentation, I may try to write something,
but I'll likely need some help, as I haven't personally worked
out good answers yet for all of the example questions I've posed
above.
reply other threads:[~2017-01-25 12:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=2017Jan25.0727.scs.0001@eskimo.com \
--to=scs+lkml@eskimo.com \
--cc=linux-kernel@vger.kernel.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