All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir@xensource.com>
To: John Levon <levon@movementarian.org>,
	Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: Atsushi SAKAI <sakaia@jp.fujitsu.com>,
	xen-devel@lists.xensource.com, Jan Beulich <jbeulich@novell.com>
Subject: Re: [PATCH] Fix clock_gettime to increment monotonically onPV-domain/x86
Date: Fri, 15 Jun 2007 14:21:12 +0100	[thread overview]
Message-ID: <C29850D8.937B%keir@xensource.com> (raw)
In-Reply-To: <20070615130808.GA13632@totally.trollied.org.uk>

On 15/6/07 14:08, "John Levon" <levon@movementarian.org> wrote:

>>> This is essentially what we've got now in Solaris. It seems like a
>>> terrible shame not to just fix it in Xen, especially given all that
>>> traffic from all CPUs to 'last_ret'.
>> 
>> How would we fix it in Xen in a way that is faster and more scalable?
> 
> A good question :)
> 
> One thing we've considered is losing some precision based upon how much
> of a delta there is between the real CPUs (i.e. drop lower bits and
> round up). But we're still (slowly) looking into the problem.

IIUC this would make it less likely to see time going backwards, but when
you do it'll be by a lot more (the size of your precision granularity), and
it'll occur when your time values are unlucky enough to be just on the wrong
sides of a boundary between two time intervals which map to different
lower-precision time values.

I believe it's a pretty fundamental property of a monotonically-increasing
counter in a distributed system that communication is required to implement
it. Time is a funny thing.

 -- Keir

  reply	other threads:[~2007-06-15 13:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-15  9:47 [PATCH] Fix clock_gettime to increment monotonically on PV-domain/x86 Atsushi SAKAI
2007-06-15 10:19 ` [PATCH] Fix clock_gettime to increment monotonically onPV-domain/x86 Jan Beulich
2007-06-15 10:26   ` Keir Fraser
2007-06-15 11:12     ` Jan Beulich
2007-06-15 11:19       ` Keir Fraser
2007-06-15 12:47       ` John Levon
2007-06-15 12:59         ` Keir Fraser
2007-06-15 13:08           ` John Levon
2007-06-15 13:21             ` Keir Fraser [this message]
2007-06-15 14:00               ` John Levon
2007-06-15 14:18                 ` Keir Fraser
2007-06-15 14:32                   ` John Levon
2007-06-15 13:58             ` [PATCH] Fix clock_gettime to increment monotonicallyonPV-domain/x86 Atsushi SAKAI
2007-06-15 11:44     ` [PATCH] Fix clock_gettime to incrementmonotonically onPV-domain/x86 Atsushi SAKAI
2007-06-19  9:21       ` [PATCH] Fix clock_gettime to incrementmonotonicallyonPV-domain/x86 Atsushi SAKAI

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=C29850D8.937B%keir@xensource.com \
    --to=keir@xensource.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=jbeulich@novell.com \
    --cc=levon@movementarian.org \
    --cc=sakaia@jp.fujitsu.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.