Arnd Bergmann arnd@arndb.de writes:
To clarify: current_kernel_time() uses at most millisecond resolution rather than microsecond, as tkr_mono.xtime_nsec only gets updated during the timer tick.
Ah you're right. I remember now: the motivation was to make sure there is basically no overhead. In some setups the full gtod can be rather slow, particularly if it falls back to some crappy timer.
I think it would be ok if it falls back to jiffies if TSC or a similar fast timer doesn't work. But the function you're using likely doesn't do that?
Has that time scale changed over the past 16 years as CPUs got faster (and system call entry times slower down again with recent changes)?
Maybe a bit, but not substantially.
-Andi