Re: [PATCH] timekeeping: Fix 1ns/tick drift with GENERIC_TIME_VSYSCALL_OLD

From: John Stultz
Date: Fri Jun 17 2016 - 16:55:24 EST


On Tue, May 31, 2016 at 6:06 AM, Thomas Graziadei
<thomas.graziadei@xxxxxxxxxxxxxxxxx> wrote:
> From: Thomas Graziadei <thomas.graziadei@xxxxxxxxxxxxxxxxx>
>
> The user notices the problem in a raw and real time drift, calling
> clock_gettime with CLOCK_REALTIME / CLOCK_MONOTONIC_RAW on a system
> with no ntp correction taking place (no ntpd or ptp stuff running).
>
> The problem is, that old_vsyscall_fixup adds an extra 1ns even though
> xtime_nsec is already held in full nsecs and the remainder in this
> case is 0. Do the rounding up buisness only if needed.
>
> Signed-off-by: Thomas Graziadei <thomas.graziadei@xxxxxxxxxxxxxxxxx>

I went ahead and queued this, but I'd still like to see the powerpc
and ia64 maintainers migrate off of the old vsyscall methods.

thanks
-john