Re: [PATCH 1/4] Add clock_gettime_ns syscall
From: Richard Cochran
Date: Tue Dec 27 2011 - 02:25:46 EST
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.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/