All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: xen-devel@lists.xensource.com, Keir Fraser <keir@xen.org>,
	Shunli Yi <syi@websense.com>, Jan Beulich <JBeulich@novell.com>,
	Saipu Liu <saliu@websense.com>, Hang Du <hdu@websense.com>
Subject: Re: [PATCH] time-xen : Reset monotonic time when sync up time from dom0 to domU
Date: Wed, 13 Oct 2010 09:02:14 -0700	[thread overview]
Message-ID: <4CB5D806.7000609@goop.org> (raw)
In-Reply-To: <0b6cc1b3-f838-482e-89dc-6f19cc8c47cc@default>

 On 10/13/2010 08:56 AM, Dan Magenheimer wrote:
> (bringing the topic up to a more theoretical level and including
> Keir and Jeremy)
>
> I wonder if the "bug" here is that "dependent wall clock" is
> an incredibly poor replacement for NTP (or a Windows Time Server)
> and a hack and really shouldn't even exist?  I suppose one could
> argue that it makes some sense in a XCP environment, and maybe
> in a server environment where a single physical server is extremely
> isolated, but does it ever make sense in a real world server
> environment?
>
> In other words, I'm arguing that the correct "fix" here is:
> Don't use dependent wallclock.

Yes, that's always been my view.  pvops kernels don't implement it.

    J

>> -----Original Message-----
>> From: Jan Beulich [mailto:JBeulich@novell.com]
>> Sent: Wednesday, October 13, 2010 6:38 AM
>> To: Hang Du
>> Cc: Saipu Liu; Shunli Yi; xen-devel@lists.xensource.com
>> Subject: RE: [Xen-devel] [PATCH] time-xen : Reset monotonic time when
>> sync up time from dom0 to domU
>>
>>>>> On 13.10.10 at 05:24, "Du, Hang" <hdu@websense.com> wrote:
>>> Sorry for my brief description in previous mail and missing
>>> is_initial_xendomain check. The kernel I submit this patch is
>>> linux-2.6.18-xen-3.4.2, I submit the patch again with in_initial-
>> xendomain
>>> check.
>> Actually, I didn't expect you to blindly insert that check, but rather
>> either explain why only DomU-s need the changed behavior (as your
>> original description suggested), or refine the description of the
>> problem you're trying to solve.
>>
>>> In this patch, we support the backward time changing sync to all
>> domUs which
>>> configured to use "dependent wall clock".
>>> Currently, without the backward time syncing, when we change the time
>>> backward in Dom0, the time in DomU would be froze.
>>> And this cause some commands hang and don't executed until the time
>> catch up
>>> with the domU time.
>>> For example:
>>> "rpm -q kernel-xen"
>>> "sleep 1"
>>> Monotonic time should be reset when sync up time from dom0 to domU to
>>> support domU backward time syncing.
>> I can see your point, however ...
>>
>>> diff -urN a/arch/i386/kernel/time-xen.c   b/arch/i386/kernel/time-
>> xen.c
>>> --- a/arch/i386/kernel/time-xen.c   2010-10-11 10:41:06.000000000
>> +0800
>>> +++ b/arch/i386/kernel/time-xen.c   2010-10-11 10:43:32.000000000
>> +0800
>>> @@ -715,6 +715,8 @@
>>>     }
>>>
>>>     if (shadow_tv_version != HYPERVISOR_shared_info->wc_version) {
>>> +        if (!is_initial_xendomain() && !independent_wallclock)
>>> +            monotonic_reset();
>>>         update_wallclock();
>> ... you definitely need to call monotonic_reset() *after* the
>> update_wallclock() (or else another vCPU, preempted in
>> do_gettimeofday() between the end of the xtime read loop
>> and the acquiring of the monotonic lock, would be able to
>> overwrite monotonic.tv with values obtained before the wall
>> clock update - similar to the secondary problem addressed by
>> c/s 1021).
>>
>> Further, blindly running a reset here doesn't seem nice in
>> the (general) case of the time getting updated forwards.
>>
>>>         schedule_clock_was_set_work = 1;
>>>     }
>> You'll also want to address Dan's concerns, and you will want to
>> get your patch formatted so that it would actually apply (read:
>> no tab -> space conversion) if you expect it to be committed
>> by Keir at some point.
>>
>> Jan
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel

  reply	other threads:[~2010-10-13 16:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-12 10:19 [PATCH] time-xen : Reset monotonic time when sync up time from dom0 to domU Du, Hang
2010-10-12 11:48 ` Jan Beulich
2010-10-13  3:24   ` Du, Hang
2010-10-13 12:37     ` Jan Beulich
2010-10-13 15:56       ` Dan Magenheimer
2010-10-13 16:02         ` Jeremy Fitzhardinge [this message]
2010-10-13 16:09         ` Keir Fraser
2010-10-13 16:16         ` Tim Deegan
2010-10-13 16:48           ` Jeremy Fitzhardinge
2010-10-14  9:07             ` Tim Deegan
2010-10-14 23:35               ` Jeremy Fitzhardinge
2010-10-15  8:39                 ` RADclock on Xen (was Re: [PATCH] time-xen : Reset monotonic time when sync up time from dom0 to domU) Tim Deegan
     [not found]                   ` <5869AFE5-6E86-46D8-8817-98DCAF39F7FC@unimelb.edu.au>
2010-10-15 23:21                     ` Jeremy Fitzhardinge
2010-10-21  3:36                       ` Darryl Veitch
2010-10-21 20:49                         ` Jeremy Fitzhardinge
2010-10-22  4:49                           ` Darryl Veitch
2010-10-15 14:09               ` [PATCH] time-xen : Reset monotonic time when sync up time from dom0 to domU Dan Magenheimer
2010-10-15 14:19                 ` Tim Deegan
2010-10-15 14:46                   ` Dan Magenheimer
2010-10-15 14:53                     ` Dan Magenheimer
2010-10-15 14:58                     ` Tim Deegan
     [not found]                   ` <c049c7f4-3db4-4552-9c70-80f0a7a440e5@default 43468AF5-4D81-47E9-A6F7-2D8A25A432FD@unimelb.edu.au>
     [not found]                     ` <43468AF5-4D81-47E9-A6F7-2D8A25A432FD@unimelb.edu.au>
2010-10-18 14:52                       ` Dan Magenheimer
2010-10-14  2:36         ` Yi, Shunli
2010-10-12 15:39 ` Dan Magenheimer

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=4CB5D806.7000609@goop.org \
    --to=jeremy@goop.org \
    --cc=JBeulich@novell.com \
    --cc=dan.magenheimer@oracle.com \
    --cc=hdu@websense.com \
    --cc=keir@xen.org \
    --cc=saliu@websense.com \
    --cc=syi@websense.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.