RE: [PATCH] time: Provide full featured jiffies_to_nsecs() function

From: Luck, Tony
Date: Fri May 16 2014 - 13:18:17 EST


> How about get uptime by get_monotonic_boottime() directly, which's
> the same as /proc/uptime.

I don't know. get_monotonic_boottime() had existed for many releases
at the point the uptime trace clock was added - so it was an available
choice. Maybe not noticed by

Is this function safe to call in every context (including NMI & machine check)?
[it uses read_seqcount_begin/read_seqcount_retry ... which I *think* is
safe ... but this stuff is tricky, so I'd like some reassurance].

Mauro, Steven: Did we just do math on jiffies because we wanted less overhead
in a tracepoint?

Bigger question (mostly for Mauro) ... what was the motivation for the "uptime"
tracer to begin with? The rasdaemon code that is using it converts the times
from traces into absolute times (by adding an offset it computes by comparing
uptime and gettimeofday() when it starts). But this would seem to be fraught
with problems:
1) Do we get this right for events that happen in daylight saving time shift windows?
2) Is there a "drift" problem for systems that stay up for months and rely on ntp
to keep wall clock time in line with reality?

-Tony
N‹§²æ¸›yú²X¬¶ÇvØ–)Þ{.nlj·¥Š{±‘êX§¶›¡Ü}©ž²ÆzÚj:+v‰¨¾«‘êZ+€Êzf£¢·hšˆ§~†­†Ûÿû®w¥¢¸?™¨è&¢)ßf”ùy§m…á«a¶Úÿ 0¶ìå