[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH]MC146818 RTC: coordinate guest clock base to des
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH]MC146818 RTC: coordinate guest clock base to destination host after migration |
Date: |
Wed, 21 Sep 2016 17:15:54 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 21/09/2016 09:36, address@hidden wrote:
> If we change base_rtc while migration, thngs look work fine as
> normal, but in fact some important information lost. QEMU lost
> knowledge of time when the guest starts. This infomation maybe hasn't
> users nowadays.
I see your point. However, I think it's simpler to have a single
"delta" between qemu_clock_get_ns(rtc_clock) and the guest RTC clock.
To do this, base_rtc and last_update could even be merged in a single
variable (offset is different).
> But maybe in the futhure we need, on the other hand, maybe some
> derived release spawned from community version needs and depends on
> this feature, who knows!
This is not a problem now. If it's needed in the future one can
complicate the code later. If it's needed by some downstream release,
they will deal with it. The goal of QEMU is to have simple code.
> Should we merge offset into last_update? I suggest better not, that
> disrupts time axis model
I agree. But I don't see a reason to keep base_rtc and last_update
separate. Together they are "rtc_delta". They are separate mostly for
debugging.
> After this patch, our next step is to eliminate deviation during
> migration. That time meaning of s->offset will be extended. In the
> further future, we may implement some functions on statistics of
> guest lifetime despite it has been migrated or not. That needs a
> fixed base_rtc.
Extending the meaning of s->offset is fine, but a fixed s->base_rtc
is not good. The guest can already modify base_rtc: it will do it every
time it calls rtc_set_time, for example if the time of day is changed in
the guest.
I suggest that you post the simplest possible patch to fix your issue,
which calls rtc_update_time pre-save and rtc_set_time post-load
(resetting s->offset after the rtc_set_time, as in the version <= 2
code). I'm interested in the code to eliminate the pause during
migration, too.
Thanks,
Paolo
- Re: [Qemu-devel] [PATCH]MC146818 RTC: coordinate guest clock base to destination host after migration, Paolo Bonzini, 2016/09/20
- Re: [Qemu-devel] [PATCH]MC146818 RTC: coordinate guest clock base to destination host after migration, address@hidden, 2016/09/20
- Re: [Qemu-devel] [PATCH]MC146818 RTC: coordinate guest clock base to destination host after migration, address@hidden, 2016/09/20
- Re: [Qemu-devel] [PATCH]MC146818 RTC: coordinate guest clock base to destination host after migration, Paolo Bonzini, 2016/09/20
- Re: [Qemu-devel] [PATCH]MC146818 RTC: coordinate guest clock base to destination host after migration, address@hidden, 2016/09/21
- Re: [Qemu-devel] [PATCH]MC146818 RTC: coordinate guest clock base to destination host after migration, address@hidden, 2016/09/21
- Re: [Qemu-devel] [PATCH]MC146818 RTC: coordinate guest clock base to destination host after migration,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH]MC146818 RTC: coordinate guest clock base to destination host after migration, address@hidden, 2016/09/22
- [Qemu-devel] [PATCH v2]MC146818 RTC: coordinate guest clock base to destination host after migration, address@hidden, 2016/09/25
- Re: [Qemu-devel] [PATCH v2]MC146818 RTC: coordinate guest clock base to destination host after migration, Paolo Bonzini, 2016/09/26
- [Qemu-devel] [PATCH v3]MC146818 RTC: coordinate guest clock base to destination host after migration, address@hidden, 2016/09/26
- Re: [Qemu-devel] [PATCH v3]MC146818 RTC: coordinate guest clock base to destination host after migration, Paolo Bonzini, 2016/09/26
- [Qemu-devel] [PATCH v4]MC146818 RTC: coordinate guest clock base to destination host after migration, address@hidden, 2016/09/26
- Re: [Qemu-devel] [PATCH v4]MC146818 RTC: coordinate guest clock base to destination host after migration, Paolo Bonzini, 2016/09/26
- [Qemu-devel] [PATCH]MC146818 RTC: Get correct guest time when irq coalesced, address@hidden, 2016/09/26
- Re: [Qemu-devel] [PATCH]MC146818 RTC: Get correct guest time when irq coalesced, Paolo Bonzini, 2016/09/26
- Re: [Qemu-devel] [PATCH]MC146818 RTC: Get correct guest time when irq coalesced, address@hidden, 2016/09/26