[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1434864469.5389876.1468014253699.JavaMail.zimbra@redhat.com>
Date: Fri, 8 Jul 2016 17:44:13 -0400 (EDT)
From: Paolo Bonzini <pbonzini@...hat.com>
To: David Matlack <dmatlack@...gle.com>
Cc: linux-kernel@...r.kernel.org, kvm list <kvm@...r.kernel.org>,
ehabkost@...hat.com,
Radim Krčmář <rkrcmar@...hat.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Hornyack <peterhornyack@...gle.com>,
Owen Hofmann <osh@...gle.com>
Subject: Re: [RFC PATCH] x86, kvm: use kvmclock to compute TSC deadline
value
> > 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
Powered by blists - more mailing lists