lkml.org 
[lkml]   [2011]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] Add clock_gettime_ns syscall
On Sun, Dec 25, 2011 at 08:51:00AM -0800, Andy Lutomirski wrote:
>
> This interface intentionally does not support sub-nanosecond
> precision. For one thing, light only travels about a foot per
> nanosecond, so nanoseconds are really pretty good for networking
> purposes. For another, 2^64 picoseconds (say) is a short enough
> interval to be inconvenient. If anyone needs sub-nanosecond
> precision for anything other than profiling, they're welcome to
> figure out an appropriate interface. For very precise profiling,
> "what time is it" is the wrong question, anyway -- modern CPUs can
> reorder things across time scales much longer than a nanosecond.

This paragraph probably should be updated, since you did add a padding
field for future sub-nanosecond reporting.

Also, on re-reading this, it seems silly to be to introduce a function
called "clock_gettime_ns" and then to say that this function cannot
answer the question, what time is it?

If the interface is a profiling only interface, then the name should
reflect this fact.

Thanks,
Richard


\
 
 \ /
  Last update: 2011-12-27 08:27    [W:2.134 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site