public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zachary Amsden <zamsden@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: Joerg Roedel <joerg.roedel@amd.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: SVM: Adjust tsc_offset only if tsc_unstable
Date: Sun, 20 Dec 2009 13:24:06 -1000	[thread overview]
Message-ID: <4B2EB216.6020909@redhat.com> (raw)
In-Reply-To: <4B2DF597.6050106@redhat.com>

On 12/19/2009 11:59 PM, Avi Kivity wrote:
> On 12/15/2009 05:38 AM, Zachary Amsden wrote:
>> On 12/14/2009 01:22 AM, Joerg Roedel wrote:
>>> The tsc_offset adjustment in svm_vcpu_load is executed
>>> unconditionally even if Linux considers the host tsc as
>>> stable. This causes a Linux guest detecting an unstable tsc
>>> in any case.
>>> This patch removes the tsc_offset adjustment if the host tsc
>>> is stable. The guest will now get the benefit of a stable
>>> tsc too.
>>>
>> Hi Joerg, I have a much more comprehensive series of patches to 
>> address this issue, please take a look.
>>
>
> Despite this, I've applied the patch to have this fix in while we 
> review your patch set (haven't started yet, sorry - still recovering 
> from nested vmx).

No worries, I can always re-base.  My patch set needs some other fixed 
bits for sleep in C-states on Intel CPUs.

Choices are:

1) do nothing; don't support these CPUs
2) do nothing; don't support MWAIT based sleep into C3 on these CPUs, 
force different idle routine
3) resync the TSC on exit from C3
4) don't use TSC here at all

If the wakeup time for a CPU needs to be fast, I prefer approach #2;

However, if the load is so low that we can drop to C3, then we can 
consider the state of deep idle to be equivalent to bring a CPU down and 
then back up, which is a problem we already know how to solve; this is 
an argument for #3.

It is also pragmatic to suggest #4, now that there exists a patchset for 
doing intercept based TSC virtualization.

Zach

      reply	other threads:[~2009-12-20 23:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-14 11:22 [PATCH] KVM: SVM: Adjust tsc_offset only if tsc_unstable Joerg Roedel
2009-12-15  3:38 ` Zachary Amsden
2009-12-20  9:59   ` Avi Kivity
2009-12-20 23:24     ` Zachary Amsden [this message]

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=4B2EB216.6020909@redhat.com \
    --to=zamsden@redhat.com \
    --cc=avi@redhat.com \
    --cc=joerg.roedel@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox