From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: USB Passthrough 1.1 performance problem... Date: Sun, 12 Dec 2010 23:16:10 +0100 Message-ID: <4D0549AA.2020007@web.de> References: <4D04B645.3010100@brakkee.org> <4D0537A8.8000607@brakkee.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigA799B23EB51CD8996E8AFED8" Cc: kvm@vger.kernel.org To: Erik Brakkee Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:43109 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751767Ab0LLWQQ (ORCPT ); Sun, 12 Dec 2010 17:16:16 -0500 In-Reply-To: <4D0537A8.8000607@brakkee.org> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA799B23EB51CD8996E8AFED8 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am 12.12.2010 21:59, Erik Brakkee wrote: > Erik Brakkee wrote: >> Hi, >> >> >> I am using a tv card in a VM and get jerky video.As I understand it, >> the VM is using USB 1.1. However, when I set the USB controller in the= >> BIOS of my server to Fullspeed (12 Mbit/s) which is the USB 1.1 speed >> I am able to get perfect results on the host but still on the guest >> the video is jerky. USB-passthrough at device level implies USB host controller emulation. This comes with some overhead and will probably never reach native performance. Virtualization also comes with occasion high latency spikes (due to host activity delaying time-critical guest jobs). Those issues are inherent. Moreover, you may run into emulation bugs, but they are fixable in principle. >> >> Are there some tuning parameters I can use or perhaps even kernel >> configuration paramters on the host to solve this? >> >> Cheers >> Erik >> >> Host: Motherboard Supermicro X8DTi-F, Intel Xeon L5630, 12MB >> OS: Opensuse 11.3 64 bit >> >> Guest: OS: Opensuse 11.3 64 bit > I can say now that I am giving up on getting this to work. One > alternative was to use PCI passthrough the USB hardware, but that > didn't work for the USB that was on the motherboard. So I bought a USB > PCI card and tried to use PCI passthrough for that. Unfortunately other= > problems occured there. >=20 > For one, the problem with 4K alignment. But I could fix that by using > the pci=3Dresource_alignment=3D... kernel parameter. In my grub/menu.ls= t it > says: >=20 > kernel /vmlinuz-2.6.34.7-0.5-default root=3D/dev/hsystem/root quiet > showopts intel_iommu=3Don > pci=3Dresource_alignment=3D01:04.0;01:04.1;01:04.2 noirqdebug vga=3D= 0x31a >=20 >=20 > The noirqdebug flas was needed to avoid the host from disabling the IRQ= > (it was a shared IRQ). >=20 > Using this, I could configure PCI passthrough and start the VM. Also th= e > USB device showed up there. Only it did not work at all. >=20 > Here is a summary of my journey up until know: >=20 > The original approach I wanted to use was to pass my old PCI card (WinT= V > PVR-500) to a VM. This card is a well supported card and has been doing= > fine for me. Because of the PCI passthrough problems with the wintv > card, I decided to try a USB card instead. This gave me a 'ctrl buffer > too small' issue that I could solve by taking the source RPM for kvm an= d > applying a known patch from red hat (increasing buffer size from 2048 t= o > 8192). But then I got jerky video, probably due to USB 1.1 issues. To > bypass these I could use PCI passthrough for USB. But with the PCI > passthrough of this card I am again running into issues probably relate= d > to Shared IRQs. So, after all this I am back to square one. >=20 > I have now modified my approach so instead of running a separate minima= l > host with my old server as a guest, I am now running the old server > (same install) on the new hardware, using it as a host. I would > definitely be interested in trying this out further in the future. I > even tried Xen for a brief moment, only to realize that my host and > guest felt slower (slower startup and execution) and much more difficul= t > to handle. >=20 > From the experience of the last two days fulltime trying to get things > working I can only conclude that the following two features would be > really important to have: >=20 > * Extended PCI passthrough support > o shared IRQ support Addressed by the series I sent out today. > o supporting cases where memory is not aligned on a 4K boundar= y Hmm, I'm seeing warnings here when passing through one of my EHCIs, but no fatal errors. > * USB passthrough > o support USB 2.0 > o support USB 3.0 (but taking one step at a time, 2.0 would > also be great). Note that this will not solve any real-time issue (if that is part of your problem). E.g.: While my EHCIs work nicely in PCI-passthrough scenarios, I'm unable to use certain webcams that sooner or later run out of sync. Jan --------------enigA799B23EB51CD8996E8AFED8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk0FSaoACgkQitSsb3rl5xRYWwCgjeaGLqqvJHC+wkoaFWHBLHmB 71wAniXV5mFQJ90DqtSW/JFpKOspj1uf =2Ew6 -----END PGP SIGNATURE----- --------------enigA799B23EB51CD8996E8AFED8--