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: Wed, 10 Mar 2010 23:13:43 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 10 Mar 2010 14:14: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=G2HpQPWwQecYhvpeISe7o5RGcMw=; b=Xwb07T7k21xDkt4hdjMQdVBlJjzVSxpVbUZVyj1waVWhuviiFSnNk+Ty+aYOeo3Ixn6nOroV/mDi+BfvYPSVnmrgBm9bcixaIwVTtRwjsPjXeJ4zPC2eElmNY5d0hLIu9pbh7jwnVksvteIAW5xFE2hPSeKAyOzuXrUNTFJOeas=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B96DB69.10101@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>
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/10/2010 12:36 AM, Jeremy Fitzhardinge wrote:
> On 03/09/2010 02:47 AM, Joanna Rutkowska wrote:
>> I would appreciate if somebody could shed some light on the currently
>> preferred setting of the clocksource for the pvops0 kernels, used both
>> in Dom0 and DomU (I'm using pvops0 in DomU because it provides backends,
>> e.g. network backend).
>>    
> 
> clocksource=xen is supposed to be the ideal clocksource, with no downsides.
> 
>> I have a bad experience with running the Dom0 kernel
>> (xen/stabale-2.6.31.6-based) with the default clocksource=xen, as it
>> results in the system getting temporary "hangs", very short ones, but
>> annoying. E.g. when one types fast on a keyboard, then every 10 seconds
>> or so, the keystroke processing seems to be slowing down significantly
>> for a second o so.
>>    
> 
> There have been a number of reports about hiccups of varying degrees of
> severity when using clocksource=xen (and, interestingly, in KVM when
> using its very similar pv clock interface).  I haven't seen anyone
> mention keyboard interactive performance; the failure mode I've seen is
> disk IO hiccuping or even getting completely wedged.  Unfortunately I
> haven't made much headway in debugging it (or even reliably reproducing
> it).
> 
> What is the hardware platform?

Intel Core 2 Duo, Intel PM45 chipset.

>  How many CPUs are you using?

2 cores, all CPU-specific power management in BIOS disabled.

> Does pinning the vcpus to pcpus help?

I tried:

xm vcpu-pin <dom> all all

for all my running domains, and it didn't change anything.

But not sure if this is correct? Perhaps I should do:

xm vcpu-pin <dom> 0 0
xm vcpu-pin <dom> 1 1
?

Perhaps there is a boot option to do the same system-wide?

>> Running the kernel with clocksource=jiffies eliminates the above problem
>> but has a disadvantage of the clock drift in Dom0. This is not
>> acceptable on my setup, where I don't have any networking in Dom0, which
>> means I cannot correct it via NTP.
>>
>> Interestingly the above problem didn't seem to affect the Dom0 kernel
>> based on xen/stable-2.6.32.
> 
> That's interesting; there's no difference in the Xen-specific
> timekeeping parts of the kernel, but perhaps something else has changed
> in the way time is handled.
> 
>

Interestingly, this keyboard hiccup effect does not occur in DomUs, only
in Dom0. However, the DomUs clearly experience some scheduling problems
-- e.g. sometime programs take a loooong time to start up, just like if
their CPU time was miscalculated and they were constantly preempted, but
xentop doesn't show any high load anywhere.

Occasionally this is visible in both Dom0's and DomU's dmesgs:

Clocksource tsc unstable (delta = 62752834 ns)
hrtimer: interrupt too slow, forcing clock min delta to 412700358 ns

> I don't remember if 3.4.2 ended up with tsc emulation, but if it does
> you might try enabling it.
> 

TSC emulation? But I'm running only PV guests. Not sure what do you mean
by this, or how to enable it?

j.

Attachment: signature.asc
Description: OpenPGP digital signature

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