On 06/03/2016 08:43 AM, Arnd Bergmann wrote: ...
The difference between do_gettimeofday and ktime_get_ts64() is that the former has an extra constant 32-bit division by NSEC_PER_USEC, which is the same thing you are addingn in the new version here.
Also, the use of a 64-bit tv_secs variable is not visible in the end, because do_gettimeofday puts a local copy of that type on the stack, and you end up converting the seconds to 32-bit either way.
I don't think there is any difference in speed between reading realtime and monotonic time either, so your version just helps avoid the fallback to jiffies and the overflow without any downsides.
All that sounds very good, thanks.
What's the target for this patch, Tina? Is there a FAQ or something I can read to see how the y2038 project generally operates?