public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joerg.roedel@amd.com>
To: Zachary Amsden <zamsden@redhat.com>
Cc: linux-kernel@vger.kernel.org, Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Dor Laor <dlaor@redhat.com>, Joerg Roedel <joro@8bytes.org>
Subject: Re: Fwd: RFC - TSC virtualization for KVM
Date: Tue, 22 Dec 2009 16:30:59 +0100	[thread overview]
Message-ID: <20091222153059.GE14679@amd.com> (raw)
In-Reply-To: <4B271B6F.4000408@redhat.com>

Hi Zachary,

On Mon, Dec 14, 2009 at 07:15:27PM -1000, Zachary Amsden wrote:
> The overall goal is to have a stable platform TSC and a mixed set of
> virtualization approaches that can be tailored for the need of the particular
> operating system running, which runs on systems regardless of hardware TSC
> frequency changes, CPU hotplug, or destabilization events, and which allows
> virtualization of multiple different TSC speeds.  I realize this is ambitious,
> but it is achievable, and I believe these patches provide a solid foundation.

I have some high-level comments on your patchset. 

First, I like the idea of introducing a new ioctl to set the guest tsc
rate. But I think it could be a little bit simpler. How about a single
__u32 parameter instead of a struct. This parameter is the tsc rate for
the guest in khz. If this value is configured to be 0 this means the cpu
tsc frequency should be used.

Second, the patchset implements very sophisticated code to keep the tsc
of different cpus synchronized. This code looks a bit fragile to me, it
does not protect against SMI or NMI (and there is no way to do so).
Have you thought about using the kernel system time as a reference and
calculate a tsc value for the vcpu? The kernel timekeeping solves most
of the problems you have here already.

Regards,

	Joerg



           reply	other threads:[~2009-12-22 15:31 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <4B271B6F.4000408@redhat.com>]

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=20091222153059.GE14679@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=avi@redhat.com \
    --cc=dlaor@redhat.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=zamsden@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