On Wed, Jun 15, 2016 at 09:41:50PM +0300, Roman Kagan wrote: > Add testcases for clock monotonicity across vCPUs. In a sense this is a > reduced adaptation of Ingo Molnar's time-wrap-test. > > These testcases are extremely unlikely to pass on SMP VMs, so they are > reported as XFAILs. Their purpose is to demonstrate that it's > impossible to achieve clock monotonicity across vCPUs (unless you can > completely exclude preemption of vCPUs by the hypervisor, of course). > > Note that even in the (faked) case of PVCLOCK_TSC_STABLE_BIT unset, when > pvclock_clocksource_read() tries to monotonize the clock using basically > the same technique as the testcase uses, it still fails the global > monotonicity test. I've finally realized the obvious "how I screwed it all up": the standard pattern is to read the clock and compare to other vCPUs / update the shared value in a single critical section. So please disregard my patches to the tests, per-cpu counters are of little interest here. Sorry for the noise, Roman. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html