Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 674562 - disable vhost-net for rhel5 and older guests
disable vhost-net for rhel5 and older guests
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Michael S. Tsirkin
Virtualization Bugs
:
: 670415 (view as bug list)
Depends On: 683295
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-02 09:13 EST by Michael S. Tsirkin
Modified: 2011-05-19 09:01 EDT (History)
6 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.136.el6
Doc Type: Bug Fix
Doc Text:
Cause: older guests (RHEL 5 and older) don't support MSI. Consequence: vhost-net has higher CPU utilization than userspace virtio on guests that don't support MSI. Fix: disable vhost-net for non-MSI guests Consequence: non-MSI guests will use userspace virtio-net and get better performance than vhost-net.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-19 07:21:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0534 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2011-05-19 07:20:36 EDT

  None (edit)
Description Michael S. Tsirkin 2011-02-02 09:13:06 EST
before rhel6.0 virtio does not use msix.
When MSI is off, each interrupt needs to be bounced through the io
thread when it's set/cleared, so vhost-net causes more context switches and
higher CPU utilization than userspace virtio which handles networking in
the same thread.
    
We'll need to fix this by adding level irq support in kvm irqfd,
for now disable vhost-net in these configurations.
Comment 2 Martin Jenner 2011-02-02 11:20:00 EST
Please provide some testing notes on how QE can effectively confirm/verify this fix is in applied correctly.

thanks,
Martin
Comment 3 Michael S. Tsirkin 2011-02-02 11:25:53 EST
run some stress test.
when vhost-net is used, you will see
a vhost thread doing a lot of work.
without, work is done by qemu thread.
Comment 4 Michael S. Tsirkin 2011-02-02 11:27:01 EST
so to clarify:
try this with rhel6 you will see vhost
try with rhel5 you will see no vhost
installs to be done with libvirt
Comment 8 Amos Kong 2011-02-19 04:10:51 EST
# qemu-kvm -drive file='/mnt/linux/RHEL-Server-5.6-64-virtio.qcow2',index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,format=qcow2,aio=native,snapshot=on  -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,id=virtio-disk1 -device virtio-net-pci,netdev=idqJrk0t,mac=9a:0c:2b:2e:ab:13,netdev=idqJrk0t,id=ndev00idqJrk0t,bus=pci.0,addr=0x3 -netdev tap,id=idqJrk0t,vhost=on,ifname='t0-165012-Ywsy',script='/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/scripts/qemu-ifup-switch',downscript='no',vhostforce=off ...

qemu: -netdev tap,id=idqJrk0t,vhost=on,ifname=t0-165012-Ywsy,script=/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/scripts/qemu-ifup-switch,downscript=no,vhostforce=off: Invalid parameter 'vhostforce'

vhostforce can't be used with '-netdev tap,...,forcevhost=off' ?

Currently forcevhost is 'on' by default, that means vhost will be enable for no-msi guest by default, is it expected?
Comment 9 Amos Kong 2011-03-08 21:17:27 EST
After talked with Jason, I reported another bug, 
Bug 683295 - qemu-kvm: Invalid parameter 'vhostforce'
Comment 10 Amos Kong 2011-03-17 05:22:14 EDT
Boot up rhel4, rhel5, rhek6 with 'vhost=on', and check if vhost_net works by 
# perf top -p `pgrep vhost`

guest   works
-----   -----
rhel4   no
rhel5   no
rhel6   yes

qemu-kvm-0.12.1.2-2.150.el6.x86_64

So moving to VERIFIED.
Comment 11 Miya Chen 2011-04-13 00:23:17 EDT
*** Bug 670415 has been marked as a duplicate of this bug. ***
Comment 12 Eduardo Habkost 2011-05-03 15:29:23 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: older guests (RHEL 5 and older) don't support MSI.

Consequence: vhost-net has higher CPU utilization than userspace virtio on guests that don't support MSI.

Fix: disable vhost-net for non-MSI guests

Consequence: non-MSI guests will use userspace virtio-net and get better performance than vhost-net.
Comment 13 errata-xmlrpc 2011-05-19 07:21:33 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html
Comment 14 errata-xmlrpc 2011-05-19 09:01:28 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html

Note You need to log in before you can comment on or make changes to this bug.