From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
Keir Fraser <keir.xen@gmail.com>, Jan Beulich <JBeulich@suse.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH] xen: fix initialization of wallclock time for PVHVM on migration
Date: Wed, 12 Jun 2013 15:55:49 +0200 [thread overview]
Message-ID: <51B87DE5.304@citrix.com> (raw)
In-Reply-To: <20130612135032.GH2918@phenom.dumpdata.com>
On 12/06/13 15:50, Konrad Rzeszutek Wilk wrote:
> On Tue, Jun 11, 2013 at 04:45:29PM +0100, Keir Fraser wrote:
>> On 11/06/2013 16:05, "Keir Fraser" <keir.xen@gmail.com> wrote:
>>
>>> On 11/06/2013 15:16, "Jan Beulich" <JBeulich@suse.com> wrote:
>>>
>>>>> Would it be OK to call
>>>>> update_domain_wallclock_time unconditionally on
>>>>> hvm_hypercall_page_initialise?
>>>>
>>>> The primary question is - why is what we have not enough for you?
>>>> In particular I would expect that the call from arch_set_info_guest()
>>>> (for vCPU 0) should do what you want. Or wait, this is covering PV
>>>> only. So yes, with the description change I would then withdraw my
>>>> NACK - apparently no-one really used the shared info wall clock
>>>> time in a HVM guest so far (or it going wrong post-resume wasn't
>>>> noticed).
>>>>
>>>> I would, however, prefer the if() immediately preceding the patch
>>>> context to be pulled out past the domain_lock()ed region, convert it
>>>> to switch(), and add your code. That was, eventual other post-
>>>> processing for the various map spaces has a consistent, easily
>>>> extensible home.
>>>
>>> I apparently made a fix for this to work on initial boot of a 32-bit PVHVM
>>> guest back in September (a change in hvmloader to not zero the wc fields in
>>> shared_info). But I agree I now can't see why it works... But it surely does
>>> as it was tested to do so by Konrad.
>>>
>>> A bit more digging required...
>>
>> Hmm I can't find any confirmation that my patch actually *did* work. :( I'm
>> sure I remember testing it though!
>
> I do remember that it did work. The issue was :
> Bug 14519356 - SYSTEM TIME DRIFTS DRASTICALLY FOR GUEST WITH UEK2 KERNEL AFTER MIGRATION
>
>
> Easily reproduced using save.restore.
> @ .
> @ [root@localhost ~]# uname -a
> @ Linux localhost.localdomain 2.6.39-300.7.0.el6uek.i686 #1 SMP Thu Sep 6
> @ 12:47:30 EDT 2012 i686 i686 i386 GNU/Linux
> @ [root@localhost ~]# date
> @ Tue Sep 11 22:38:19 PDT 2012
> @ [root@localhost ~]# uptime
> @ 09:24:43 up 15590 days, 17:16, 3 users, load average: 2.75, 1.21, 0.47
> @ [root@localhost ~]#
> @ [root@localhost ~]# date
> @ Mon Apr 14 09:24:51 PDT 1919
> @ [root@localhost ~]#
>
> So the date went back to 1919.
>
> .. and the reason was the the shared page (which is not re-inited by
> the kernel) ends up with a large negative delta causing it to go back
> in time.
What I saw on recent Linux kernels (I think it was 3.9) is that the
kernel switches the clocksource from Xen to another available
clocksource when it sees an unreasonable drift, so it is not such a big
problem with upstream kernels.
next prev parent reply other threads:[~2013-06-12 13:55 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-11 10:46 [PATCH] xen: fix initialization of wallclock time for PVHVM on migration Roger Pau Monne
2013-06-11 11:59 ` Jan Beulich
2013-06-11 12:01 ` George Dunlap
2013-06-11 12:12 ` Jan Beulich
2013-06-11 13:59 ` Ian Campbell
2013-06-11 14:04 ` Jan Beulich
2013-06-12 13:36 ` Egger, Christoph
2013-06-11 12:17 ` Roger Pau Monné
2013-06-11 13:15 ` konrad wilk
2013-06-11 14:02 ` Jan Beulich
2013-06-11 13:38 ` Roger Pau Monné
2013-06-11 14:16 ` Jan Beulich
2013-06-11 14:41 ` Konrad Rzeszutek Wilk
2013-06-11 15:05 ` Keir Fraser
2013-06-11 15:45 ` Keir Fraser
2013-06-11 15:59 ` Roger Pau Monné
2013-06-11 16:12 ` Keir Fraser
2013-06-11 16:14 ` Roger Pau Monné
2013-06-11 15:59 ` Jan Beulich
2013-06-12 13:50 ` Konrad Rzeszutek Wilk
2013-06-12 13:55 ` Roger Pau Monné [this message]
2013-06-11 15:50 ` Keir Fraser
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=51B87DE5.304@citrix.com \
--to=roger.pau@citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=keir.xen@gmail.com \
--cc=konrad.wilk@oracle.com \
--cc=xen-devel@lists.xen.org \
/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;
as well as URLs for NNTP newsgroup(s).