WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] open Linux question

To: Jan Beulich <jbeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] open Linux question
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 13 Dec 2007 11:56:19 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>
Delivery-date: Thu, 13 Dec 2007 03:50:26 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47612574.76E4.0078.0@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acg9fywYaqFIM6lyEdy4+wAWy6hiGQ==
Thread-topic: [Xen-devel] open Linux question
User-agent: Microsoft-Entourage/11.3.6.070618
On 13/12/07 11:28, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:

> I'm not talking about the whole time handling, just the sched_clock()
> implementation taking stolen time into account.
> 
> I have to admit that one of the reasons that I didn't try doing this so far
> is the odd 'if (offset < 0)' check in there - I would have expected that
> rather than doing this the xen_clocksource_read()/get_runstate_snapshot()
> pair would need to go in a loop checking that the time version didn't
> change (and then a negative offset ought to be a bug).

Oh, I see. I think the pv_ops sched_clock() implementation is fine.
xen_clocksource_read()/get_runstate_snapshot() do their own version-checkign
loops, and I don't think there is really an accuracy issue in not pulling
those checks into an outer loop. The 'offset < 0' check is cheap and
frankly, where time based on TSC is concerned, it's a nice safety catch. I'd
be happy to see that sched_clock() implementation ported into other trees.

 -- Keir



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

<Prev in Thread] Current Thread [Next in Thread>