public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Erik Brakkee <erik@brakkee.org>
To: Jan Kiszka <jan.kiszka@web.de>, kvm@vger.kernel.org
Subject: Re: USB Passthrough 1.1 performance problem...
Date: Sun, 12 Dec 2010 23:31:19 +0100	[thread overview]
Message-ID: <4D054D37.7040107@brakkee.org> (raw)
In-Reply-To: <4D0549AA.2020007@web.de>

Jan Kiszka wrote:
>
>>> 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.
>>
>> For one, the problem with 4K alignment. But I could fix that by using
>> the pci=resource_alignment=... kernel parameter. In my grub/menu.lst it
>> says:
>>
>>     kernel /vmlinuz-2.6.34.7-0.5-default root=/dev/hsystem/root quiet
>>     showopts intel_iommu=on
>>     pci=resource_alignment=01:04.0;01:04.1;01:04.2 noirqdebug vga=0x31a
>>
>>
>> The noirqdebug flas was needed to avoid the host from disabling the IRQ
>> (it was a shared IRQ).
>>
>> Using this, I could configure PCI passthrough and start the VM. Also the
>> USB device showed up there. Only it did not work at all.
>>
>> Here is a summary of my journey up until know:
>>
>> The original approach I wanted to use was to pass my old PCI card (WinTV
>> 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 and
>> applying a known patch from red hat (increasing buffer size from 2048 to
>> 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 related
>> to Shared IRQs. So, after all this I am back to square one.
>>
>> I have now modified my approach so instead of running a separate minimal
>> 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 difficult
>> to handle.
>>
>>  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:
>>
>>     * Extended PCI passthrough support
>>           o shared IRQ support
>>      
> Addressed by the series I sent out today.
>    
Does this mean I have a chance now that PCI passthrough of my WinTV 
PVR-500 might work now?
What version is this and where can I get this for opensuse?

I still have the setup I used for testing with the host OS still 
installed but not running so it would be really easy to try out new 
releases of KVM (it is not a serious production server after all but 
mainly used to run some websites and mailing lists).

>    
>>           o supporting cases where memory is not aligned on a 4K boundary
>>      
> Hmm, I'm seeing warnings here when passing through one of my EHCIs, but
> no fatal errors.
>    
In my case, the domain just didn't start.
Btw. I was using 0.12.5 on opensuse 11.3 but could only find the sources 
for 0.12.3 on download.opensuse.org (perhaps I looked wrong) and I 
patched those for th 4K issue. PCI passthrough also did not work with my 
wintv pci card with KVM 0.12.5.
>    
>>     * 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
>
>    
Is your point in this case that USB in a VM based on PCI passthrough 
will always have problems when it comes to more real-time issues or does 
this only apply to USB passthrough? I can imagine that PCI passthrough 
is better since it uses hardware support. By the way, I have seen issues 
in the past whereby the tv card stopped working because of high load on 
the server running natively so real-time issues also exist apart from 
virtualization.

Apart from this, I am definitely interested in getting updates for KVM 
on opensuse. Is there a channel for that?



  reply	other threads:[~2010-12-12 22:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-12 11:47 USB Passthrough 1.1 performance problem Erik Brakkee
2010-12-12 20:59 ` Erik Brakkee
2010-12-12 22:16   ` Jan Kiszka
2010-12-12 22:31     ` Erik Brakkee [this message]
2010-12-13  8:25       ` Alexander Graf
2010-12-14 10:02         ` Avi Kivity
2010-12-14 10:11           ` Alexander Graf
2010-12-31 17:00           ` Kevin O'Connor
2010-12-13 23:27       ` Jan Kiszka
2010-12-13 23:50       ` Kenni Lund
     [not found]         ` <3047113345.976756218@brakkee.org>
2010-12-14  0:47           ` Kenni Lund
     [not found]             ` <5085473063.976781602@brakkee.org>
2010-12-14 11:55               ` Kenni Lund
2010-12-14 12:05                 ` Daniel P. Berrange
2010-12-14 21:47                   ` Erik Brakkee
2010-12-14 23:44                     ` Kenni Lund
2010-12-16 16:23                       ` Erik Brakkee
2010-12-16 21:46                         ` Erik Brakkee
2010-12-24 18:19                           ` Erik Brakkee
2010-12-13 10:36 ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D054D37.7040107@brakkee.org \
    --to=erik@brakkee.org \
    --cc=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox