All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Leonard Norrgard
	<leonard.norrgard-g2GXA8XeJSExHbG02/KK1g@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH 2/3] Add a vcpu_migrated statistic
Date: Sat, 03 Mar 2007 10:58:04 +0200	[thread overview]
Message-ID: <45E9389C.3000702@qumranet.com> (raw)
In-Reply-To: <45E8567C.6080704-g2GXA8XeJSExHbG02/KK1g@public.gmane.org>

Leonard Norrgard wrote:
> The previous patch introduces an IPI on every vcpu migration on SMP
> machines to find out the TSC value on the previous cpu. We might be
> able to avoid this IPI on systems that have a synchronized TSC by
> checking for it in svm/vmx_vcpu_load:
>
> +               /* If this isn't the first vcpu_load and if the TSC
> +                  doesn't run at a constant rate, we must handle TSC
> +                  offsets. */
> +               if (vcpu->cpu != -1
> +                   && !boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) {
>
> Wether this is actually reliable and working in the intended way is
> not know yet.  

Reading the documentation for X86_FEATURE_CONSTANT_TSC, I'm not sure either.


> In the meantime, introduce a statistic for vcpu
> migration, so we get some decision support for the needs for such an
> optimization.
>
>   

The statistic is great (vcpu migrations are very expensive, we should 
know when they happen), but why two unrelated changes in a patch?  I 
think you can drop the constant tsc optimization for now, given we 
aren't certain it works as we expect.


-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

  parent reply	other threads:[~2007-03-03  8:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-02 16:41 [PATCH 0/3] Sync TSC for guest when vcpu has been migrated to another cpu Leonard Norrgard
     [not found] ` <45E853A0.3080207-g2GXA8XeJSExHbG02/KK1g@public.gmane.org>
2007-03-02 16:48   ` [PATCH 1/3] Sync guest viewable TSC when vcpu migrated Leonard Norrgard
     [not found]     ` <45E85566.3010706-g2GXA8XeJSExHbG02/KK1g@public.gmane.org>
2007-03-02 16:55       ` Anthony Liguori
     [not found]         ` <45E85717.6030906-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-03-02 17:13           ` Leonard Norrgard
2007-03-03  8:47       ` Avi Kivity
2007-03-02 16:53   ` [PATCH 2/3] Add a vcpu_migrated statistic Leonard Norrgard
     [not found]     ` <45E8567C.6080704-g2GXA8XeJSExHbG02/KK1g@public.gmane.org>
2007-03-03  8:58       ` Avi Kivity [this message]
2007-03-02 16:55   ` [PATCH 3/3] Widen key column in kvm_stat Leonard Norrgard

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=45E9389C.3000702@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=leonard.norrgard-g2GXA8XeJSExHbG02/KK1g@public.gmane.org \
    /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.