All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Dan Hecht <dhecht@vmware.com>
Cc: Ingo Molnar <mingo@elte.hu>, Zachary Amsden <zach@vmware.com>,
	jeremy@goop.org, avi@quramnet.com,
	kvm-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	Glauber de Oliveira Costa <gcosta@redhat.com>,
	Glauber de Oliveira Costa <glauber@qumranet.com>,
	--cc@redhat.com, Garrett Smith <garrett@vmware.com>
Subject: Re: [kvm-devel] [PATCH] raise tsc clocksource rating
Date: Tue, 30 Oct 2007 06:24:56 +0200	[thread overview]
Message-ID: <4726B218.8010101@qumranet.com> (raw)
In-Reply-To: <47266B90.8000008@vmware.com>

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.


WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Dan Hecht <dhecht-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
Cc: Zachary Amsden <zach-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>,
	jeremy-TSDbQ3PG+2Y@public.gmane.org,
	avi-i/T1Zxg06OZWk0Htik3J/w@public.gmane.org,
	kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	Glauber de Oliveira Costa
	<glauber-atKUWr5tajBWk0Htik3J/w@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Glauber de Oliveira Costa
	<gcosta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	--cc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	Garrett Smith <garrett-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] raise tsc clocksource rating
Date: Tue, 30 Oct 2007 06:24:56 +0200	[thread overview]
Message-ID: <4726B218.8010101@qumranet.com> (raw)
In-Reply-To: <47266B90.8000008-pghWNbHTmq7QT0dZR+AlfA@public.gmane.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/

  reply	other threads:[~2007-10-30  4:26 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-29 23:10 [PATCH] raise tsc clocksource rating Glauber de Oliveira Costa
2007-10-29 23:10 ` Glauber de Oliveira Costa
2007-10-29 22:17 ` Thomas Gleixner
2007-10-29 22:17   ` Thomas Gleixner
2007-10-29 22:36   ` Ingo Molnar
2007-10-30  1:26   ` john stultz
2007-10-30  2:39   ` Rusty Russell
2007-10-30  2:39     ` Rusty Russell
2007-10-30  7:37     ` Ingo Molnar
2007-10-30  7:37       ` Ingo Molnar
2007-10-30 10:52       ` Rusty Russell
2007-10-30 10:52         ` Rusty Russell
2007-10-30 12:13       ` Glauber de Oliveira Costa
2007-10-30 12:13         ` Glauber de Oliveira Costa
2007-10-29 22:42 ` Zachary Amsden
2007-10-29 22:42   ` Zachary Amsden
2007-10-29 22:45   ` Jeremy Fitzhardinge
2007-10-29 22:45     ` Jeremy Fitzhardinge
2007-10-29 22:48   ` Ingo Molnar
2007-10-29 22:52     ` Jeremy Fitzhardinge
2007-10-29 22:52       ` Jeremy Fitzhardinge
2007-10-29 22:55       ` Ingo Molnar
2007-10-29 23:17         ` Jeremy Fitzhardinge
2007-10-29 23:17           ` Jeremy Fitzhardinge
2007-10-29 23:21           ` Ingo Molnar
2007-10-29 23:21             ` Ingo Molnar
2007-10-29 23:33             ` Jeremy Fitzhardinge
2007-10-29 23:33               ` Jeremy Fitzhardinge
2007-10-30  0:45             ` Ian Pratt
2007-10-30  0:45               ` Ian Pratt
2007-10-30  7:19               ` Ingo Molnar
2007-10-30  7:19                 ` Ingo Molnar
2007-10-29 22:55     ` Zachary Amsden
2007-10-29 22:55       ` Zachary Amsden
2007-10-29 23:02       ` Ingo Molnar
2007-10-29 23:13         ` Zachary Amsden
2007-10-29 23:17           ` Ingo Molnar
2007-10-29 23:17             ` Ingo Molnar
2007-10-30 12:02           ` Glauber de Oliveira Costa
2007-10-30 12:02             ` Glauber de Oliveira Costa
2007-10-30 17:58             ` Zachary Amsden
2007-10-30 17:58               ` Zachary Amsden
2007-10-29 23:24         ` Dan Hecht
2007-10-29 23:24           ` Dan Hecht
2007-10-30  4:24           ` Avi Kivity [this message]
2007-10-30  4:24             ` Avi Kivity
2007-10-30  7:14           ` Ingo Molnar
2007-10-30  7:14             ` Ingo Molnar
2007-10-30 11:59       ` Glauber de Oliveira Costa
2007-10-30 11:59         ` Glauber de Oliveira Costa
2007-10-30  0:17 ` H. Peter Anvin
2007-10-30  0:17   ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4726B218.8010101@qumranet.com \
    --to=avi@qumranet.com \
    --cc=--cc@redhat.com \
    --cc=avi@quramnet.com \
    --cc=dhecht@vmware.com \
    --cc=garrett@vmware.com \
    --cc=gcosta@redhat.com \
    --cc=glauber@qumranet.com \
    --cc=jeremy@goop.org \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=zach@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.