From: Paolo Bonzini <pbonzini@redhat.com>
To: David Matlack <dmatlack@google.com>
Cc: linux-kernel@vger.kernel.org, "kvm list" <kvm@vger.kernel.org>,
ehabkost@redhat.com, "Radim Krčmář" <rkrcmar@redhat.com>,
"Andy Lutomirski" <luto@kernel.org>,
"Peter Hornyack" <peterhornyack@google.com>,
"Owen Hofmann" <osh@google.com>
Subject: Re: [RFC PATCH] x86, kvm: use kvmclock to compute TSC deadline value
Date: Fri, 8 Jul 2016 17:44:13 -0400 (EDT) [thread overview]
Message-ID: <1434864469.5389876.1468014253699.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <CALzav=fgFeh4eDL8G0xLUvWRqZhX2mRZeORqotykz6RjOL-8VQ@mail.gmail.com>
> > Luckily tsc_khz is really used by very little
> > outside the tsc clocksource (which kvmclock replaces) and the TSC
> > deadline timer.
>
> Two other ways to solve the problem, I don't know if you've considered:
> * Constrain the set of hosts a given VM can run on based on the TSC
> rate. (So don't need a perfectly homogenous fleet, just need each VM
> to be constrained to a homogenous subset).
True.
> * Disable the TSC deadline timer from QEMU by assigning a CPUID with
> the TSC capability zeroed (at least among VMs which could migrate to
> hosts with different TSC rates). These VMs will use the APIC timer
> which runs at a nice fixed rate.
Yes, this is the trivial workaround, but given the nice speedup from
the TSC deadline timer I didn't consider it.
To solve the migration problem I'm thinking of using the kvmclock MSR.
For example, if a bit is set in the kvmclock MSR then userspace should
convert the TSC deadline MSR to nanoseconds on migration and back to TSC
units on the destination. In other words, it says that the guest is
okay with the TSC deadline MSR changing under its feet when live
migration happens. But there may be other solutions.
Paolo
prev parent reply other threads:[~2016-07-08 21:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-05 17:36 [RFC PATCH] x86, kvm: use kvmclock to compute TSC deadline value Paolo Bonzini
2016-07-06 13:01 ` Andy Lutomirski
2016-07-06 13:03 ` Paolo Bonzini
2016-07-06 17:17 ` David Matlack
2016-07-08 21:44 ` Paolo Bonzini [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=1434864469.5389876.1468014253699.JavaMail.zimbra@redhat.com \
--to=pbonzini@redhat.com \
--cc=dmatlack@google.com \
--cc=ehabkost@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=osh@google.com \
--cc=peterhornyack@google.com \
--cc=rkrcmar@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