[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Fix clock_gettime to increment monotonically onPV-domain/x86


  • To: Jan Beulich <jbeulich@xxxxxxxxxx>, Atsushi SAKAI <sakaia@xxxxxxxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxxxxxxxx>
  • Date: Fri, 15 Jun 2007 11:26:35 +0100
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 15 Jun 2007 03:22:05 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcevN6Y25Qm8ShsqEdyfcQAWy6hiGQ==
  • Thread-topic: [Xen-devel] [PATCH] Fix clock_gettime to increment monotonically onPV-domain/x86

Yeah, it needs a spinlock. Which is a shame, but it's still going to be much
faster than trapping into the hypervisor, which is the only other way we're
going to be able to achieve guaranteed monotonic time.

We could avoid the lock if we guaranteed monotonic time only per task
(thread). Or is that not really good enough? :-)

 -- Keir

On 15/6/07 11:19, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:

> I'm afraid this isn't MP-safe - you're in a (pseudo-)read-locked section of
> code,
> yet write a global variable (and even in two pieces). Jan
> 
>>>> Atsushi SAKAI <sakaia@xxxxxxxxxxxxxx> 15.06.07 11:47 >>>
> Hi, Keir
> 
>   This patch intends to increment do_gettimeofday monotonically.
> This is for PV-domain/x86.
> 
> Signed-off-by: Atsushi SAKAI <sakaia@xxxxxxxxxxxxxx>
> 
> By applying patch, the time rollback for SMP is fixed.
> This is important fixes for database software.
> 
> Thanks
> Atsushi SAKAI
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.