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] A clocksource question

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] A clocksource question
From: Joanna Rutkowska <joanna@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Mar 2010 11:49:30 +0100
Cc: Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Delivery-date: Thu, 11 Mar 2010 02:55:47 -0800
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type; s=smtpout; bh=F2Nqm3dz+Su1c62BjXTdVAKz054=; b=U1WGf62u/QkTnR9XCNOJzRs4nZYTs2sXB/Xmc6s7h9eWtTXrt1+8aDAhrnI3rhrRzRrBdSSQ5bDp8XWnoSArimv/IXJ4SwJDAULTVcc0UlMeqtO3z9iSXiKgwmH56BafdFfQLXa1f77MeCNlYl0FwrUE3ACkhKzTr7t82jmcSoo=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B9877CA.4060204@xxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4B962748.90609@xxxxxxxxxxxxxxxxxxxxxx> <4B96DB69.10101@xxxxxxxx 4B981997.4030605@xxxxxxxxxxxxxxxxxxxxxx> <56cc3abf-21f6-4178-b00e-0331538080d9@default> <4FA716B1526C7C4DB0375C6DADBC4EA3554D53F1B0@xxxxxxxxxxxxxxxxxxxxxxxxx> <4B983EC9.2030105@xxxxxxxxxxxxxxxxxxxxxx> <4B98421F.7040102@xxxxxxxx> <4B984533.9030402@xxxxxxxxxxxxxxxxxxxxxx> <4B9877CA.4060204@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.3
On 03/11/2010 05:55 AM, Jeremy Fitzhardinge wrote:
> On 03/10/2010 05:19 PM, Joanna Rutkowska wrote:
>> On 11/03/2010 02:06, Jeremy Fitzhardinge wrote:
>>   
>>> On 03/10/2010 04:52 PM, Joanna Rutkowska wrote:
>>>     
>>>> BTW, how does the clocksource=jiffies work on a pvops kernel in Dom0?
>>>>
>>>>        
>>> Not very well.  clocksource=jiffies just sets up timer interrupts at
>>> approx 100ms intervals and assumes that's 100ms.  You get very low res
>>> timers and timekeeping.
>>>
>>>      
>> So, how to explain that there is no wallclock drift *at all*, even in a
>> long run -- uptime of a few days, in Dom0, when it uses the jiffies
>> source?
>>    
> 
> You said earlier that you were seeing clock drift with
> clocksource=jiffies in dom0.
> 
Correct, sorry. With jiffies I do get a wallclock drift, yes.

>> Anyway, I assume that the "xen" clock source is much more fine grained
>> (1ms?)
> 
> The xen clocksource has nanosecond resolution.  But clocksources are
> different from event sources, and so the ns resolution of time
> measurement doesn't have much relationship to the timer precision (which
> is always going to use the xen event source, which is also ns
> resolution, but it will tend to fold together timer events which are
> closer than 50us).
> 
>>   and so, maybe my kbd hiccups are caused by some code executed by
>> the timer interrupt too frequently (maybe too much code executes per
>> each timer interrupt, because of some other bug)? Just a though...
>>    
> 
> Possibly, but doesn't seem too likely.  Can you tell if your hiccups are
> accompanied by bursts of timer interrupts in /proc/interrupts?
> 
> There is another possibility, which is that the scheduler is getting
> confused by xen's scheduler clock.  Rather than just scheduling based on
> real time, we try to take into account time stolen from a vcpu so that
> it isn't credited against the process (which may have had all its time
> stolen by another domain).  But that could just be confusing things.
> 
> Does this help?
> 
> diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c

Will build a new kernel with this and let you know.

j.

Attachment: signature.asc
Description: OpenPGP digital signature

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