|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] Fix clock_gettime to increment monotonically onP
On Fri, Jun 15, 2007 at 02:21:12PM +0100, Keir Fraser 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.
The idea is that it would never be wrong enough to hit that case (taken
to extremes we wouldn't expect to see it go backwards by a minute!)
> 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.
Well. It's proven a reasonable assumption for us on the x86 systems
we're supporting that the TSC difference between CPUs is stable enough
for us to provide effective monotonicity. This is much harder to do from
a virtual CPU for obvious reasons :)
regards
john
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|