Re: [PATCH] raise tsc clocksource rating

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Dan Hecht <dhecht@...>
Cc: Zachary Amsden <zach@...>, Glauber de Oliveira Costa <gcosta@...>, <linux-kernel@...>, <tglx@...>, <rusty@...>, <jeremy@...>, <--cc@...>, <avi@...>, <kvm-devel@...>, Glauber de Oliveira Costa <glauber@...>, Garrett Smith <garrett@...>
Date: Tuesday, October 30, 2007 - 3:14 am

* Dan Hecht <dhecht@vmware.com> wrote:


Of course if you duplicate all (or part) of the TSC clocksource driver 
in the paravirt guest code then the "paravirt clocksource" is at least 
as good as the TSC. But that argument is playing word-games, _of course_ 
if you use the same (or similar) code it's at least as good. The real 
question are clocksources that communicate out to the hypervisor, and 
hence have higher overhead than a native, TSC based clocksource - and 
clocksources that use the TSC in a broken way.


hey, you need not tell me, i've implemented a hyper-clocksource driver 
myself. But calibration is a boot only issue and there's no reason why 
calibration _has_ to be fragile. For example we could easily extend the 
TSC clocksource driver to not calibrate in the guest but take 
calibration information from the host. It's in essence a trivial and 
obvious extension to calibration. That way we get the highest possible 
performance _and_ we share much of the clocksource driver with the host.

also, the way the TSC is used by guests like Xen is fundamentally 
fragile on SMP. So i have a good reason to distrust the approach of 
hypervisors to timekeeping. The maintenance problem to me is that 
everyone in the paravirt space is busy coding away in their own (often 
broken) direction, replicating the essence of the TSC clocksource driver 
4 times over again and again, with subtle bugs in each variant, even in 
cases where the TSC readout can be trusted perfectly well. 
"Consolidation" and "sharing code" is not a particularly strong point of 
the paravirt projects ;-) (ok, KVM is a notable exception there.)

anyway, i do agree that this patch is wrong currently, mainly due to TSC 
calibration not being reliable in guest-space at the moment - but the 
whole concept of putting a separate clocksource driver into each 
paravirt guest, even in the case where the TSC is perfect, is madness. 
That code, once the hardware gets sane (and there are good signs for 
that), and once calibration can be passed from host to guest reliably, 
_will_ be consolidated, because it makes perfect technical sense.

	Ingo
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] raise tsc clocksource rating, Glauber de Oliveira Costa..., (Mon Oct 29, 7:10 pm)
Re: [PATCH] raise tsc clocksource rating, H. Peter Anvin, (Mon Oct 29, 8:17 pm)
Re: [PATCH] raise tsc clocksource rating, Zachary Amsden, (Mon Oct 29, 6:42 pm)
Re: [PATCH] raise tsc clocksource rating, Ingo Molnar, (Mon Oct 29, 6:48 pm)
Re: [PATCH] raise tsc clocksource rating, Zachary Amsden, (Mon Oct 29, 6:55 pm)
Re: [PATCH] raise tsc clocksource rating, Glauber de Oliveira Costa..., (Tue Oct 30, 7:59 am)
Re: [PATCH] raise tsc clocksource rating, Ingo Molnar, (Mon Oct 29, 7:02 pm)
Re: [PATCH] raise tsc clocksource rating, Dan Hecht, (Mon Oct 29, 7:24 pm)
Re: [PATCH] raise tsc clocksource rating, Ingo Molnar, (Tue Oct 30, 3:14 am)
Re: [kvm-devel] [PATCH] raise tsc clocksource rating, Avi Kivity, (Tue Oct 30, 12:24 am)
Re: [PATCH] raise tsc clocksource rating, Zachary Amsden, (Mon Oct 29, 7:13 pm)
Re: [PATCH] raise tsc clocksource rating, Glauber de Oliveira Costa..., (Tue Oct 30, 8:02 am)
Re: [PATCH] raise tsc clocksource rating, Zachary Amsden, (Tue Oct 30, 1:58 pm)
Re: [PATCH] raise tsc clocksource rating, Ingo Molnar, (Mon Oct 29, 7:17 pm)
Re: [PATCH] raise tsc clocksource rating, Jeremy Fitzhardinge, (Mon Oct 29, 6:52 pm)
Re: [PATCH] raise tsc clocksource rating, Ingo Molnar, (Mon Oct 29, 6:55 pm)
Re: [PATCH] raise tsc clocksource rating, Jeremy Fitzhardinge, (Mon Oct 29, 7:17 pm)
Re: [PATCH] raise tsc clocksource rating, Ingo Molnar, (Mon Oct 29, 7:21 pm)
Re: [PATCH] raise tsc clocksource rating, Jeremy Fitzhardinge, (Mon Oct 29, 7:33 pm)
Re: [PATCH] raise tsc clocksource rating, Jeremy Fitzhardinge, (Mon Oct 29, 6:45 pm)
Re: [PATCH] raise tsc clocksource rating, Thomas Gleixner, (Mon Oct 29, 6:17 pm)
Re: [PATCH] raise tsc clocksource rating, Rusty Russell, (Mon Oct 29, 10:39 pm)
Re: [PATCH] raise tsc clocksource rating, Ingo Molnar, (Tue Oct 30, 3:37 am)
Re: [PATCH] raise tsc clocksource rating, Glauber de Oliveira Costa..., (Tue Oct 30, 8:13 am)
Re: [PATCH] raise tsc clocksource rating, Rusty Russell, (Tue Oct 30, 6:52 am)
Re: [PATCH] raise tsc clocksource rating, john stultz, (Mon Oct 29, 9:26 pm)
Re: [PATCH] raise tsc clocksource rating, Ingo Molnar, (Mon Oct 29, 6:36 pm)