From: Daniel Magenheimer Subject: RE: Does Xen detect busy-spinning VCPUs? Date: Fri, 19 Sep 2008 07:36:13 -0700 (PDT) Message-ID: <9548184c-cd3e-4dac-afa6-13480c178e79@default> References: <200809191400.24747.kaiser@informatik.fh-wiesbaden.de> Mime-Version: 1.0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <200809191400.24747.kaiser@informatik.fh-wiesbaden.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Robert Kaiser , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Is your mini-OS pinned and you're sure dom0 or other domains are not getting a piece of the pcpu? If so... I've seen anecdotal evidence of long pauses that led me to wonder about interrupt latency here: http://lists.xensource.com/archives/html/xen-devel/2008-08/msg00232.html I don't recall the situation or the length of the pause but perhaps you are seeing something similar. Unfortunately, I never pursued the answer to the interrupt latency question. > -----Original Message----- > From: Robert Kaiser [mailto:kaiser@informatik.fh-wiesbaden.de] > Sent: Friday, September 19, 2008 6:00 AM > To: xen-devel@lists.xensource.com > Subject: [Xen-devel] Does Xen detect busy-spinning VCPUs? >=20 >=20 > Hi all, >=20 > I'm currently developing/testing a new scheduler for Xen and=20 > I am seeing some=20 > very strange behaviour which I can't seem to pinpoint: For=20 > benchmarking=20 > purposes, I am running a task inside Mini-OS in a tight,=20 > busy-spinning loop=20 > for some time. The loop repeatedly polls NOW() until it=20 > exceeds a certain=20 > time limit. What I am observing is that NOW() seems to "jump"=20 > sometimes: two=20 > subsequent reads return values which differ by tens of=20 > milliseconds! I notice=20 > that my scheduler gets invoked a couple of times, but it does=20 > *not* switch to=20 > another VCPU and I doubt that the scheduler invocations alone=20 > take that long.=20 > So the loop should indeed be contiuously spinning with sporadic=20 > interruptions in the range of a few microseconds, but not tens of=20 > milliseconds. Yet, this is not what I am seeing. I wonder=20 > where the (P)CPU=20 > goes during those time intervals and so this possibly weird=20 > idea came up that=20 > Xen might use some trickery trying to detect and pause=20 > busy-spinning VCPUs.=20 > Is there anything like that in Xen (BTW: This is xen-3.2.1) ,=20 > and, if there=20 > is, can it be disabled for a given domain? >=20 > (Sorry if this is a silly question. Since my code is=20 > experimental and not well=20 > tested yet, there is of course the possibility that I made=20 > some stupid=20 > mistake. However, I've been staring at code, debug logs, etc.=20 > for several=20 > days now without much success and I am slowly getting=20 > desperate. If Xen=20 > really does pause spinning VCPUs it would explain everything.) >=20 > Thanks for any help >=20 > Rob >=20 > --=20 > Robert Kaiser =20 > http://wwwvs.informatik.fh-wiesbaden.de > Labor f=FCr Verteilte Systeme =20 > kaiser@informatik.fh-wiesbaden.de > FH Wiesbaden - University of Applied Sciences tel:=20 > (+49)611-9495-1294 > Kurt-Schumacher-Ring 18, 65197 Wiesbaden, Germany fax:=20 > (+49)611-9495-1289 >=20 > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >