From: Sander Eikelenboom Subject: Re: Re: pci passthrough xhci host controller Date: Thu, 30 Sep 2010 21:24:48 +0200 Message-ID: <1115867214.20100930212448@eikelenboom.it> References: <1262837074.20100915230935@eikelenboom.it> <20100920203344.GA26201@dumpdata.com> <1227438201.20100921220310@eikelenboom.it> <20100927155952.GA4741@dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20100927155952.GA4741@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 , Jeremy Fitzhardinge Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Hello Konrad, I have done some more tests, the results: - boot xen with mem=3D4G, > 2 days uptime with passthrough and videograbbing - boot xen without mem=3D4G, < 1 day freeze with passthrough and videograbb= ing - on both no problems as long as you don't grab video (so the controller do= esn't do much) - on both no problems when grabbing video with usb2, so it's xhci specific I haven't changed anything else, same number of VM's running etc. etc., vid= eograbbing is working on both (until the freeze or until i ended the test) I'm reading some messages about msi(-x) interrupt problems with xen on xen-= devel, and suggestions to try noirqbalance with xen, so on both i use noirq= balance. So it seems to be related to the amount of mem available. I do see one difference on the domU, with mem=3D4G i see some occasional wa= rnings in syslog: Sep 28 17:55:02 security kernel: [81744.078288] xhci_hcd 0000:07:00.0: WARN= : transfer error on endpoint Sep 28 17:55:02 security kernel: [81744.092653] xhci_hcd 0000:07:00.0: WARN= : transfer error on endpoint Sep 28 17:55:02 security kernel: [81744.093647] xhci_hcd 0000:07:00.0: WARN= : transfer error on endpoint Sep 28 17:55:02 security kernel: [81744.093647] xhci_hcd 0000:07:00.0: WARN= : transfer error on endpoint Sep 28 17:55:02 security kernel: [81744.093647] xhci_hcd 0000:07:00.0: WARN= : transfer error on endpoint I don't see these warnings in the syslog when no mem=3D4G is used, so a hun= ch would be it goes wrong there while the xhci code tries to clean somethin= g up. It could do something "strange" that seems to work on bare metal and on xen= with mem=3D4G, but freezes everything with mem > 4G and gives no time to w= rite the warning to the syslog / disk in time. in the syslog of dom0 i do see some occasional memleaks going by, but one s= et could be related: Sep 28 17:55:19 localhost kernel: [81962.053321] kmemleak: 22 new suspected= memory leaks (see /sys/kernel/debug/kmemleak) I will add a script that cat's the content of /sys/kernel/debug/kmemleak to= syslog when kmemleak reports new suspected leaks. Any suggestions to try to debug this further ? I boot with: title xen-4.1-unstable.gz / Debian GNU/Linux, 2.6.32.21-xen-stabl= e-2.6.32.x-20100914 root (hd0,0) kernel /xen-4.1-unstable.gz mem=3D4G dom0_mem=3D768M loglvl=3Dall = loglvl_guest=3Dall com1=3D115200,8n1 sync_console console_to_ring console_t= imestamps console=3Dcom1,vga iommu=3Dsoft noirqbalance irqbalance=3Doff module /vmlinuz-2.6.32.21-xen-stable-2.6.32.x-20100914 root=3D/dev= /mapper/serveerstertje-root ro earlyprintk=3Dxen max_loop=3D255 loop_max_pa= rt=3D63 libata.noacpi=3D1 iommu=3Dsoft xen-pciback.hide=3D(03:06.0)(07:00.0= )(09:01.0)(09:01.1)(09:01.2) pci=3Dresource_alignment=3D03:06.0;07:00.0;09:= 01.0;09:01.1;09:01.2; module /initrd.img-2.6.32.21-xen-stable-2.6.32.x-20100914 -- Sander Monday, September 27, 2010, 5:59:52 PM, you wrote: > On Tue, Sep 21, 2010 at 10:03:10PM +0200, Sander Eikelenboom wrote: >> Hi Konrad, >>=20 >> I indeed have the feeling the memleak's aren't huge, and adding the dive= rse kernel hacking debug options, ended op doing more wrong than right. >> I have turned off the options i added, re-instated the "swiotlb=3Dforce"= in the domU config to see if it goes from a working to a freezing config, = but i have the feeling it will not make a difference. >>=20 >> Then i have 4 differences left: >>=20 >> - Other dom0 kernel since the tests resulting in continous freezes of my= server >> - Other domU kernel since the tests resulting in continous freezes of my= server >> - Other workload (server is running more VM's) >> - Other physical hardware >> - server is AMD phenom X6, current config Intel quad core >> - Both have there iommu disabled >> - Both are 64 capable cpu's with 64 xen, dom0 and domU >>=20 >> - But most notably perhaps, the intel has only 2GB RAM, the serv= er 8GB >>=20 >> Could the available physical RAM be an issue here ? >> I limit the ram for dom0 with dom0_mem=3D > OK, but that would not limit the memory of where the guest get their memo= ry. I think > you might need this in conjunction with maxmem, say: maxmem=3D4GB dom0_me= m=3Dmax:512MB > This way your 8GB machine has 4GB of memory available for both dom0 and t= he guest. >>=20 >> After this test succeeds on the intel machine, i will retry the samen xe= n,dom0 kernel and domU kernel on the AMD config. >> Is there anything i can especially log/configure/debug to get more detai= l to see if the 8GB could be the problem ? > I think we have concluded that the device in question (3.0 PCIe USB host = controller) can do > 64-bit DMA. In which case the SWIOTLB is only used as an address translat= ion system (pfn ->> mfn, and vice-versa). If it was 32-bit it would also be utilized f= or bouncing > the DMA buffers - there are sometimes cases were the driver does not sync= after the bounce > (perfect examples are the existing radeon/nouveau drivers) ending up with= corruption/hanged > device. But those show up early in development, and this is the new USB c= ontroller than > can do 64-bit instead of the dreaded 32-bit limit that all other USB cont= rollers are stuck > with it. > The memory difference might be a red-herring. It could be the workload - = more VMs > and a latency issue (say we are waiting for an IRQ and it comes just a bi= t too late)? > I think the idea of narrowing down on the AMD machine the amount of memor= y could help. > What is the exact model of your USB capture device and the USB PCI device? --=20 Best regards, Sander mailto:linux@eikelenboom.it