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] Does Xen detect busy-spinning VCPUs?

To: "Robert Kaiser" <kaiser@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Does Xen detect busy-spinning VCPUs?
From: "Geoffrey Lefebvre" <geoffrey@xxxxxxxxx>
Date: Fri, 19 Sep 2008 08:57:29 -0700
Cc: Daniel Magenheimer <dan.magenheimer@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 19 Sep 2008 08:58:15 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=yfCY3RknSBvWYYrZFgmTQser69tEnlLhAZ4AWDdtPr4=; b=sLgOLmcFmSfIZQOyGJVg0l3Ant1q1weXa9dQYfliaAvqs33yL5FCXiOPaj8vXKfIKx nRwSDOijNbQ0AH+Ca+qa3+ITH6CsEcBbsiIx2576e8mf8VTbjEJE363cx5qTO4V7gKSY 3f6Nr/PLe9sRk8GYnAUiI+xcwm+w2vPRxFlI0=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=TM+4Pye9B76v3QgrqNNQ58K7DnfnEL5LsZll+h9mNsWkg7NduTw5krx/vPaa7s88lS ai1IU4b3X86Vns620/p9bz7ghBlV2f7+96g75DYjWDP/C85CdEglcNRfTp/1/wvM+uxz xRZ4ZeIOAyyJ52xcxyBPdrW38vBtRW7mS9S68=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200809191747.02817.kaiser@xxxxxxxxxxxxxxxxxxxxxxxxxx>
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: <9548184c-cd3e-4dac-afa6-13480c178e79@default> <200809191747.02817.kaiser@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> I am seeing situations where two subsequent calls to NOW() in the Mini-OS
> context deliver time coordinates that differ by 95(!) milliseconds. If this
> were due to interrupt latencies, surely that would have been noticed by
> someone?

These are long latencies. Have you tried comparing the values returned
by NOW() in mini-os with reads from the tsc? NOW() is probably correct
but it's a good thing to rule this out.

geoffrey


>
>> I never pursued the answer to the interrupt latency question.
>>
>> > -----Original Message-----
>> > From: Robert Kaiser [mailto:kaiser@xxxxxxxxxxxxxxxxxxxxxxxxxx]
>> > Sent: Friday, September 19, 2008 6:00 AM
>> > To: xen-devel@xxxxxxxxxxxxxxxxxxx
>> > Subject: [Xen-devel] Does Xen detect busy-spinning VCPUs?
>> >
>> >
>> > Hi all,
>> >
>> > I'm currently developing/testing a new scheduler for Xen and
>> > I am seeing some
>> > very strange behaviour which I can't seem to pinpoint: For
>> > benchmarking
>> > purposes, I am running a task inside Mini-OS in a tight,
>> > busy-spinning loop
>> > for some time. The loop repeatedly polls NOW() until it
>> > exceeds a certain
>> > time limit. What I am observing is that NOW() seems to "jump"
>> > sometimes: two
>> > subsequent reads return values which differ by tens of
>> > milliseconds! I notice
>> > that my scheduler gets invoked a couple of times, but it does
>> > *not* switch to
>> > another VCPU and I doubt that the scheduler invocations alone
>> > take that long.
>> > So  the loop should indeed be contiuously spinning with sporadic
>> > interruptions in the range of a few microseconds, but not tens of
>> > milliseconds. Yet, this is not what I am seeing. I wonder
>> > where the (P)CPU
>> > goes during those time intervals and so this possibly weird
>> > idea came up that
>> > Xen might use some trickery trying to detect and pause
>> > busy-spinning VCPUs.
>> > Is there anything like that in Xen (BTW: This is xen-3.2.1) ,
>> > and, if there
>> > is, can it be disabled for a given domain?
>> >
>> > (Sorry if this is a silly question. Since my code is
>> > experimental and not well
>> > tested yet, there is of course the possibility that I made
>> > some stupid
>> > mistake. However, I've been staring at code, debug logs, etc.
>> > for several
>> > days now without much success and I am slowly getting
>> > desperate. If Xen
>> > really does pause spinning VCPUs it would explain everything.)
>> >
>> > Thanks for any help
>> >
>> > Rob
>> >
>> > --
>> > Robert Kaiser
>> > http://wwwvs.informatik.fh-wiesbaden.de
>> > Labor für Verteilte Systeme
>> > kaiser@xxxxxxxxxxxxxxxxxxxxxxxxxx
>> > FH Wiesbaden - University of Applied Sciences     tel:
>> > (+49)611-9495-1294
>> > Kurt-Schumacher-Ring 18, 65197 Wiesbaden, Germany fax:
>> > (+49)611-9495-1289
>> >
>> > _______________________________________________
>> > Xen-devel mailing list
>> > Xen-devel@xxxxxxxxxxxxxxxxxxx
>> > http://lists.xensource.com/xen-devel
>
>
>
> --
> Robert Kaiser                    http://wwwvs.informatik.fh-wiesbaden.de
> Labor für Verteilte Systeme            kaiser@xxxxxxxxxxxxxxxxxxxxxxxxxx
> FH Wiesbaden - University of Applied Sciences     tel: (+49)611-9495-1294
> Kurt-Schumacher-Ring 18, 65197 Wiesbaden, Germany fax: (+49)611-9495-1289
>
> _______________________________________________
> 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