lkml.org 
[lkml]   [2016]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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

    \
     
     \ /
      Last update: 2016-07-09 00:21    [W:3.137 / U:0.520 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site