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.