Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime()
From: Leonid Yegoshin
Date: Wed Oct 28 2015 - 16:15:45 EST
On 10/28/2015 12:55 PM, Alex Smith wrote:
On 28 October 2015 at 19:28, Leonid Yegoshin <Leonid.Yegoshin@xxxxxxxxxx> wrote:
.
Clocksources are not per-CPU. If the CP0 counter is the current
clocksource, then both the kernel and VDSO implementations of
gettimeofday will read out the CP0 counter from whatever CPU they run
on.
OK, it was an invalid example. Let's be specific - in case of different
clock frequency in different CPUs it easy to adjust it in kernel via
clocksource->read()/etc but it is impossible to adjust that in VDSO
implementation.
And that can't be fixed easily without some-kind of "per-thread" data
page for correct multipliers.
There are many problems with assumption that in all kind of MIPS cores
R4K CP0_COUNT registers are in sync in different CPUs. Even current
kernel has problems here but I think it is not excuse to mount more on it.
- Leonid.
--
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/