From: Sander Eikelenboom Subject: Re: xen dependant on pcpu 0 ? Date: Tue, 12 Oct 2010 20:50:49 +0200 Message-ID: <12210566675.20101012205049@eikelenboom.it> References: <1452957126.20101012182813@eikelenboom.it> <20101012164433.GB21567@dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20101012164433.GB21567@dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Konrad Rzeszutek Wilk Cc: Ian , Jeremy Fitzhardinge , "xen-devel@lists.xensource.com" , Keir Fraser List-Id: xen-devel@lists.xenproject.org Tuesday, October 12, 2010, 6:44:33 PM, you wrote: > On Tue, Oct 12, 2010 at 06:28:13PM +0200, Sander Eikelenboom wrote: >> Hi Keir, >>=20 >> Does xen and/or the xen console depend on physical cpu 0 ? > Usually the console for Dom0, and I think all other domains go > through CPU0. Let me CC Ian here, who has been mucking in this > area and found some bugs (and produced fixes). > Ian, that bug you found with not clearing the eventchannel - that > wouldn't have an impact here, right? >>=20 >> I'm still trying to solve the mystery of my machine freezing when doing: >>=20 >> - videograbbing in a domU with a usb3 pci-express controller passed thr= ough (seems to cause quite a few interrupts) >> - compiling a linux kernel with "make -j 6" >>=20 >> It's a 6 core AMD phenom x6. >>=20 >> Without cpu pinning: >> I can freeze the machine easily within a minute after starting the compi= le, at first xen serial console also slows down under the load (slow update= s). >> When the machine freezes i can't do anything with xen serial console. >>=20 >> With cpu pinning: >> By not using the pcpu 0 at all for any domain, and pinning the domain wi= th the videograbber to it's own pcpu (pcpu 5) it seems the machine keeps r= unning after 20 "make -j6" iterations of kernel compilation. >> Xen serial console stays responsive and doesn't slow down during the ker= nel compilation. The videograbber shows no problem grabbing video. >>=20 > AHA! So finally closer to the mystery. So i thought ... but all though it survived 20 iterations of kernel compili= ng, it still froze while the dom0 was relatively idle, and the domU still g= rabing video. This time it gave the "RCU detected CPU stalls " again cpu 0, since it's do= m0 that should be vcpu0=3Dpcpu1. My xen serial console was frozen again, so= i can't dump anything. But: -the hypervisor should still have pcpu0 available -dom0 has pcpu1-4 although shared with some other mostly idle domains -domU with videograbbing has pcpu5 So the cpu pinning seems to change things a bit, but only in the sense that= it survives some what longer ... Another thing i'm wondering about is that xentop reports that dom0 consumes= about 50% cpu, when i use top on dom0, i seem to get nowhere near 50% when= using the 2.6.31 pvops kernel With the latest 2.6.32-pvops there is a problem that events/0 consumes a lo= t of cpu related to xenconsoled (jeremy has allready a thread running on th= at). That's why i now tested 2.6.31-pvops that hasn't got that issue. > Can you provide the /proc/interrupts of the Dom0? Just when running for some time, or try to get it under load / just before = freeze ? > I wonder if this is related to the isseu I had some time ago, and never g= ot > to look at. The problem was that during heavy compilation (this is a 2 Ne= helem > socket box, just running Dom0 - no guests), the keyboard and USB driver w= ould > stop getting interrupts. So the drivers would start polling which is qui= te slow, > albeit servicable, and then at some point it would pick up again. > The weirdness was that the /proc/interrupts showed absolutly _no_ interru= pts on CPU0 > during that time - as if Xen just forgot to update them. Jeremy suggested= I try to > disable Xen IRQ balance (noirqbalance on Xen command line) in case that i= s it, and to my > emberrasement I haven't tried that yet. I did try that before, didn't seem to make a difference, but i will try aga= in just to be sure. > Did you try that? I think somebody suggested that but I can't recall whet= her it > was for this issue? >>=20 >> Name ID VCPU CPU State Time(s) CPU A= ffinity >> Domain-0 0 0 3 r-- 2169.7 1-4 >> Domain-0 0 1 1 -b- 2339.3 1-4 >> Domain-0 0 2 2 -b- 2358.9 1-4 >> Domain-0 0 3 3 -b- 2298.2 1-4 >> Domain-0 0 4 1 -b- 2221.9 1-4 >> Domain-0 0 5 4 -b- 2287.7 1-4 >> backup 9 0 4 -b- 10.6 1-4 >> database 1 0 4 -b- 45.3 1-4 >> davical 5 0 3 -b- 8.7 1-4 >> git 8 0 2 -b- 7.9 1-4 >> mail 2 0 4 -b- 8.0 1-4 >> samba 3 0 3 -b- 11.1 1-4 >> security 7 0 5 r-- 1433.2 5 >> www 4 0 1 -b- 10.2 1-4 >> zabbix 6 0 3 -b- 21.2 1-4 >>=20 >>=20 >> Is there a way a deadlock could occur between hypervisor <-> dom0 <-> do= mU especially related to passthrough/interrupts in the context of pcpu 0 ? > I don't know, but I do know that the IRQ handling in Xen 4.0 changed sign= ificantly compared > to 3.4. I don't remember if you ever ran this setup under 3.4? I tried xen 3.4-testing as well today (in combination with 2.6.31-pvops as = dom0), but that resulted in a videograbbing domU going beserk, the xhci dri= ver complains about "spurious interrupts" multiple times a second. >>=20 >> -- >> Sander