[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] kvmclock: clock should count only if vm is runn
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] kvmclock: clock should count only if vm is running (v2) |
Date: |
Mon, 01 Jul 2013 13:44:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 |
Il 25/06/2013 14:18, Gleb Natapov ha scritto:
> On Tue, Jun 18, 2013 at 08:38:25PM -0300, Marcelo Tosatti wrote:
>> >
>> > v2: remove unnecessary runstate_is_running() usage (Paolo)
>> >
>> > --
>> >
>> > kvmclock should not count while vm is paused, because:
>> >
>> > 1) if the vm is paused for long periods, timekeeping
>> > math can overflow while converting the (large) clocksource
>> > delta to nanoseconds.
>> >
>> > 2) Users rely on CLOCK_MONOTONIC to count run time, that is,
>> > time which OS has been in a runnable state (see CLOCK_BOOTTIME).
>> >
>> > Change kvmclock driver so as to save clock value when vm transitions
>> > from runnable to stopped state, and to restore clock value from stopped
>> > to runnable transition.
>> >
>> > Signed-off-by: Marcelo Tosatti <address@hidden>
>
> Applied, thanks.
Cc: address@hidden
Gleb, the commit hash is fixed now that you applied the patch---so I
cannot just amend it to include the Cc, right?
Paolo
- Re: [Qemu-devel] [PATCH] kvmclock: clock should count only if vm is running (v2),
Paolo Bonzini <=