On Mon, Jun 14, 2010 at 09:34:07PM -1000, Zachary Amsden wrote:
SMP VMs on machines with unstable TSC have their TSC offset adjusted by theI believe this should be done not only if we have check_tsc_unstable() == true,
local offset delta from last measurement. This does not take into account how
long it has been since the measurement, leading to drift. Minimize the drift
by accounting for any time difference the kernel has observed.
Signed-off-by: Zachary Amsden<zamsden@xxxxxxxxxx>
but anytime we adjust the tsc. I mean:
Sure it is expected to be much more relevant in this case, but if we're testing
generally for tsc_delta< 0 in the adjustment code, it is because we believe
it can happen, even if tsc is stable (otherwise, we'd better take it off completely).
And in that case, we should account elapsed time too.