From: Sander Eikelenboom Subject: Re: xen dependant on pcpu 0 ? Date: Tue, 12 Oct 2010 21:37:42 +0200 Message-ID: <1658569276.20101012213742@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 Hi Konrad, Here are the /proc/interrupts, without any cpu pinning, with normal interru= pts i saw a pciback entry in /proc/interrupts in dom0, but with msi-x these= seem to be missing ? /proc/interrupts dom0 (2.6.31-pvops), running domU with videograbber active= , little other activity in dom0 CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 1: 2 0 0 0 0 0 xe= n-pirq-ioapic-edge i8042 8: 0 0 0 0 0 0 xe= n-pirq-ioapic-edge rtc0 9: 0 0 0 0 0 0 xe= n-pirq-ioapic-level acpi 12: 4 0 0 0 0 0 xe= n-pirq-ioapic-edge i8042 17: 2 0 0 0 0 0 xe= n-pirq-ioapic-level ehci_hcd:usb1, ehci_hcd:usb2, ehci_hcd:usb3 18: 33 0 0 0 0 0 xe= n-pirq-ioapic-level ohci_hcd:usb4, ohci_hcd:usb5, ohci_hcd:usb6, ohci_hcd:= usb7 25: 18 0 0 0 0 0 xe= n-pirq-ioapic-level HDA Intel 903: 38 0 0 0 0 0 x= en-dyn-event vif9.0 904: 912 0 0 0 0 0 x= en-dyn-event blkif-backend 905: 18 0 0 0 0 0 x= en-dyn-event blkif-backend 906: 409 0 0 0 0 0 x= en-dyn-event evtchn:xenconsoled 907: 285 0 0 0 0 0 x= en-dyn-event evtchn:xenstored 908: 12 0 0 0 0 0 x= en-dyn-event vif8.0 909: 4882 0 0 0 0 0 x= en-dyn-event blkif-backend 910: 19 0 0 0 0 0 x= en-dyn-event blkif-backend 911: 465 0 0 0 0 0 x= en-dyn-event evtchn:xenconsoled 912: 426 0 0 0 0 0 x= en-dyn-event evtchn:xenstored 913: 252 0 0 0 0 0 x= en-dyn-event vif7.0 916: 135 0 0 0 0 0 x= en-dyn-event blkif-backend 917: 1822 0 0 0 0 0 x= en-dyn-event blkif-backend 918: 25 0 0 0 0 0 x= en-dyn-event blkif-backend 919: 1021 0 0 0 0 0 x= en-dyn-event pciback 920: 947 0 0 0 0 0 x= en-dyn-event evtchn:xenconsoled 921: 357 0 0 0 0 0 x= en-dyn-event evtchn:xenstored 922: 61440 0 0 0 0 0 x= en-dyn-event vif6.0 923: 3065 0 0 0 0 0 x= en-dyn-event blkif-backend 924: 25 0 0 0 0 0 x= en-dyn-event blkif-backend 925: 236 0 0 0 0 0 x= en-dyn-event evtchn:xenconsoled 926: 262 0 0 0 0 0 x= en-dyn-event evtchn:xenstored 927: 12 0 0 0 0 0 x= en-dyn-event vif5.0 928: 932 0 0 0 0 0 x= en-dyn-event blkif-backend 929: 19 0 0 0 0 0 x= en-dyn-event blkif-backend 930: 272 0 0 0 0 0 x= en-dyn-event evtchn:xenconsoled 931: 288 0 0 0 0 0 x= en-dyn-event evtchn:xenstored 932: 59 0 0 0 0 0 x= en-dyn-event vif4.0 933: 1263 0 0 0 0 0 x= en-dyn-event blkif-backend 934: 23 0 0 0 0 0 x= en-dyn-event blkif-backend 935: 282 0 0 0 0 0 x= en-dyn-event evtchn:xenconsoled 936: 201 0 0 0 0 0 x= en-dyn-event vif3.0 937: 286 0 0 0 0 0 x= en-dyn-event evtchn:xenstored 938: 1082 0 0 0 0 0 x= en-dyn-event blkif-backend 939: 19 0 0 0 0 0 x= en-dyn-event blkif-backend 940: 301 0 0 0 0 0 x= en-dyn-event evtchn:xenconsoled 941: 18 0 0 0 0 0 x= en-dyn-event vif2.0 942: 810 0 0 0 0 0 x= en-dyn-event blkif-backend 943: 19 0 0 0 0 0 x= en-dyn-event blkif-backend 944: 280 0 0 0 0 0 x= en-dyn-event evtchn:xenstored 945: 281 0 0 0 0 0 x= en-dyn-event evtchn:xenconsoled 946: 42169 0 0 0 0 0 x= en-dyn-event vif1.0 947: 279 0 0 0 0 0 x= en-dyn-event evtchn:xenstored 948: 24824 0 0 0 0 0 x= en-dyn-event blkif-backend 949: 19 0 0 0 0 0 x= en-dyn-event blkif-backend 950: 285 0 0 0 0 0 x= en-dyn-event evtchn:xenconsoled 951: 282 0 0 0 0 0 x= en-dyn-event evtchn:xenstored 952: 0 0 0 0 0 0 x= en-dyn-event evtchn:xenstored 953: 5922 0 0 0 0 0 x= en-dyn-event evtchn:xenstored 954: 22988 0 0 0 0 0 xe= n-pirq-msi eth1 955: 21566 0 0 0 0 0 xe= n-pirq-msi eth0 956: 0 0 0 0 0 0 xe= n-pirq-msi ahci 957: 72163 0 0 0 0 0 xe= n-pirq-msi ahci 968: 0 0 0 0 0 0 x= en-dyn-virq pcpu 969: 11384 0 0 0 0 0 x= en-dyn-event xenbus 970: 0 0 0 0 0 1347 x= en-dyn-ipi callfuncsingle5 971: 0 0 0 0 0 0 x= en-dyn-virq debug5 972: 0 0 0 0 0 390 x= en-dyn-ipi callfunc5 973: 0 0 0 0 0 10300 x= en-dyn-ipi resched5 974: 0 0 0 0 0 137425 x= en-dyn-virq timer5 975: 0 0 0 0 1504 0 x= en-dyn-ipi callfuncsingle4 976: 0 0 0 0 0 0 x= en-dyn-virq debug4 977: 0 0 0 0 394 0 x= en-dyn-ipi callfunc4 978: 0 0 0 0 20872 0 x= en-dyn-ipi resched4 979: 0 0 0 0 254028 0 x= en-dyn-virq timer4 980: 0 0 0 1560 0 0 x= en-dyn-ipi callfuncsingle3 981: 0 0 0 0 0 0 x= en-dyn-virq debug3 982: 0 0 0 309 0 0 x= en-dyn-ipi callfunc3 983: 0 0 0 23055 0 0 x= en-dyn-ipi resched3 984: 0 0 0 348681 0 0 x= en-dyn-virq timer3 985: 0 0 1252 0 0 0 x= en-dyn-ipi callfuncsingle2 986: 0 0 0 0 0 0 x= en-dyn-virq debug2 987: 0 0 415 0 0 0 x= en-dyn-ipi callfunc2 988: 0 0 24141 0 0 0 x= en-dyn-ipi resched2 989: 0 0 415948 0 0 0 x= en-dyn-virq timer2 990: 0 1847 0 0 0 0 x= en-dyn-ipi callfuncsingle1 991: 0 0 0 0 0 0 x= en-dyn-virq debug1 992: 0 404 0 0 0 0 x= en-dyn-ipi callfunc1 993: 0 22844 0 0 0 0 x= en-dyn-ipi resched1 994: 0 484202 0 0 0 0 x= en-dyn-virq timer1 995: 1148 0 0 0 0 0 x= en-dyn-ipi callfuncsingle0 996: 0 0 0 0 0 0 x= en-dyn-virq debug0 997: 276 0 0 0 0 0 x= en-dyn-ipi callfunc0 998: 17435 0 0 0 0 0 x= en-dyn-ipi resched0 999: 1296208 0 0 0 0 0 x= en-dyn-virq timer0 NMI: 0 0 0 0 0 0 N= on-maskable interrupts LOC: 0 0 0 0 0 0 L= ocal timer interrupts SPU: 0 0 0 0 0 0 S= purious interrupts CNT: 0 0 0 0 0 0 P= erformance counter interrupts PND: 0 0 0 0 0 0 P= erformance pending work RES: 17435 22844 24141 23055 20872 10300 R= escheduling interrupts CAL: 1424 2251 1667 1869 1898 1737 F= unction call interrupts TLB: 0 0 0 0 0 0 T= LB shootdowns TRM: 0 0 0 0 0 0 T= hermal event interrupts MCE: 0 0 0 0 0 0 M= achine check exceptions MCP: 5 5 5 5 5 5 M= achine check polls ERR: 0 MIS: 0 /proc/interrupts in videograbbing domU (2.6.36 pci-front0.7) CPU0 44: 0 xen-pirq-pcifront ohci_hcd:usb2 45: 0 xen-pirq-pcifront ohci_hcd:usb3 46: 0 xen-pirq-pcifront ehci_hcd:usb1 86: 0 xen-pirq-pcifront-msi-x xhci_hcd 87: 147452 xen-pirq-pcifront-msi-x xhci_hcd 244: 461 xen-dyn-event eth0 245: 151 xen-dyn-event blkif 246: 2720 xen-dyn-event blkif 247: 30 xen-dyn-event blkif 248: 309 xen-dyn-event hvc_console 249: 2 xen-dyn-event pcifront 250: 603 xen-dyn-event xenbus 251: 0 xen-percpu-ipi callfuncsingle0 252: 0 xen-percpu-virq debug0 253: 0 xen-percpu-ipi callfunc0 254: 0 xen-percpu-ipi resched0 255: 193070 xen-percpu-virq timer0 NMI: 0 Non-maskable interrupts LOC: 0 Local timer interrupts SPU: 0 Spurious interrupts PMI: 0 Performance monitoring interrupts PND: 0 Performance pending work RES: 0 Rescheduling interrupts CAL: 0 Function call interrupts TLB: 0 TLB shootdowns MCE: 0 Machine check exceptions MCP: 0 Machine check polls ERR: 0 MIS: 0 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. > Can you provide the /proc/interrupts of the Dom0? > 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. > 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? >>=20 >> -- >> Sander --=20 Best regards, Sander mailto:linux@eikelenboom.it