From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] raise tsc clocksource rating Date: Tue, 30 Oct 2007 06:24:56 +0200 Message-ID: <4726B218.8010101@qumranet.com> References: <11936994092607-git-send-email-gcosta@redhat.com> <1193697734.9793.86.camel@bodhitayantram.eng.vmware.com> <20071029224852.GA27547@elte.hu> <1193698505.9793.90.camel@bodhitayantram.eng.vmware.com> <20071029230213.GA1982@elte.hu> <47266B90.8000008@vmware.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Zachary Amsden , jeremy-TSDbQ3PG+2Y@public.gmane.org, avi-i/T1Zxg06OZWk0Htik3J/w@public.gmane.org, kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Glauber de Oliveira Costa , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Glauber de Oliveira Costa , --cc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Garrett Smith To: Dan Hecht Return-path: In-Reply-To: <47266B90.8000008-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Dan Hecht wrote: > Not really. In the case hardware TSC is perfect, the paravirt time > counter can be implemented directly in terms of hardware TSC; there is > no loss in optimization. This is done transparently. And virtual TSC > can be implemented this way too. > > The real improvement that a paravirt clocksource offers over the TSC > clocksource is that the guest does not need to measure the TSC frequency > itself against some other constant frequency source (which is > problematic on a virtual machine). Instead, the paravirt clocksource > queries the hypervisor for the frequency of the counter. As you know, > with clocksource style kernels, it's important to get this frequency > correct, or else the guest will have long-term time drift. > > In addition, a paravirt clocksource can compensate for events like vcpu migration to another host cpu. So I agree: a paravirt clocksource is always better than or equal to the tsc. -- Any sufficiently difficult bug is indistinguishable from a feature. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/