mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-09 06:50:22 +00:00
e9bd5c0e24
This is in response to: https://bugzilla.redhat.com/show_bug.cgi?id=629662 Explanation qemu's virtio-net-pci driver allows setting the algorithm used for tx packets to either "bh" or "timer". This is done by adding ",tx=bh" or ",tx=timer" to the "-device virtio-net-pci" commandline option. 'bh' stands for 'bottom half'; when this is set, packet tx is all done in an iothread in the bottom half of the driver. (In libvirt, this option is called the more descriptive "iothread".) 'timer' means that tx work is done in qemu, and if there is more tx data than can be sent at the present time, a timer is set before qemu moves on to do other things; when the timer fires, another attempt is made to send more data. (libvirt retains the name "timer" for this option.) The resulting difference, according to the qemu developer who added the option is: bh makes tx more asynchronous and reduces latency, but potentially causes more processor bandwidth contention since the cpu doing the tx isn't necessarily the cpu where the guest generated the packets. Solution This patch provides a libvirt domain xml knob to change the option on the qemu commandline, by adding a new attribute "txmode" to the <driver> element that can be placed inside any <interface> element in a domain definition. It's use would be something like this: <interface ...> ... <model type='virtio'/> <driver txmode='iothread'/> ... </interface> I chose to put this setting as an attribute to <driver> rather than as a sub-element to <tune> because it is specific to the virtio-net driver, not something that is generally usable by all network drivers. (note that this is the same placement as the "driver name=..." attribute used to choose kernel vs. userland backend for the virtio-net driver.) Actually adding the tx=xxx option to the qemu commandline is only done if the version of qemu being used advertises it in the output of qemu -device virtio-net-pci,? If a particular txmode is requested in the XML, and the option isn't listed in that help output, an UNSUPPORTED_CONFIG error is logged, and the domain fails to start.
100 lines
3.3 KiB
Plaintext
100 lines
3.3 KiB
Plaintext
open /dev/kvm: No such file or directory
|
|
Could not initialize KVM, will disable KVM support
|
|
name "pci-bridge", bus PCI
|
|
name "virtio-balloon-pci", bus PCI
|
|
name "virtio-serial-pci", bus PCI, alias "virtio-serial"
|
|
name "virtio-net-pci", bus PCI
|
|
name "virtio-blk-pci", bus PCI
|
|
name "i82562", bus PCI
|
|
name "i82559er", bus PCI
|
|
name "i82559c", bus PCI
|
|
name "i82559b", bus PCI
|
|
name "i82559a", bus PCI
|
|
name "i82558b", bus PCI
|
|
name "i82558a", bus PCI
|
|
name "i82557c", bus PCI
|
|
name "i82557b", bus PCI
|
|
name "i82557a", bus PCI
|
|
name "i82551", bus PCI
|
|
name "i82550", bus PCI
|
|
name "pcnet", bus PCI
|
|
name "rtl8139", bus PCI
|
|
name "e1000", bus PCI, desc "Intel Gigabit Ethernet"
|
|
name "ide-drive", bus IDE
|
|
name "isa-ide", bus ISA
|
|
name "ES1370", bus PCI, desc "ENSONIQ AudioPCI ES1370"
|
|
name "AC97", bus PCI, desc "Intel 82801AA AC97 Audio"
|
|
name "intel-hda", bus PCI, desc "Intel HD Audio Controller"
|
|
name "hda-duplex", bus HDA, desc "HDA Audio Codec, duplex"
|
|
name "hda-output", bus HDA, desc "HDA Audio Codec, output-only"
|
|
name "VGA", bus PCI
|
|
name "SUNW,fdtwo", bus System
|
|
name "sysbus-fdc", bus System
|
|
name "isa-serial", bus ISA
|
|
name "cirrus-vga", bus PCI, desc "Cirrus CLGD 54xx VGA"
|
|
name "isa-parallel", bus ISA
|
|
name "piix4-usb-uhci", bus PCI
|
|
name "piix3-usb-uhci", bus PCI
|
|
name "vmware-svga", bus PCI
|
|
name "ib700", bus ISA
|
|
name "ne2k_isa", bus ISA
|
|
name "testdev", bus ISA
|
|
name "pci-assign", bus PCI, desc "pass through host pci devices to the guest"
|
|
name "qxl", bus PCI, desc "Spice QXL GPU (secondary)"
|
|
name "qxl-vga", bus PCI, desc "Spice QXL GPU (primary, vga compatible)"
|
|
name "smbus-eeprom", bus I2C
|
|
name "usb-hub", bus USB
|
|
name "usb-host", bus USB
|
|
name "usb-kbd", bus USB
|
|
name "usb-mouse", bus USB
|
|
name "usb-tablet", bus USB
|
|
name "usb-wacom-tablet", bus USB, desc "QEMU PenPartner Tablet"
|
|
name "usb-braille", bus USB
|
|
name "usb-serial", bus USB
|
|
name "usb-net", bus USB
|
|
name "usb-bt-dongle", bus USB
|
|
name "usb-ccid", bus USB, desc "CCID Rev 1.1 smartcard reader"
|
|
name "ccid-card-passthru", bus ccid-bus, desc "passthrough smartcard"
|
|
name "virtserialport", bus virtio-serial-bus
|
|
name "virtconsole", bus virtio-serial-bus
|
|
name "i6300esb", bus PCI
|
|
name "ne2k_pci", bus PCI
|
|
pci-assign.host=pci-hostaddr
|
|
pci-assign.iommu=uint32
|
|
pci-assign.configfd=string
|
|
virtio-blk-pci.class=hex32
|
|
virtio-blk-pci.drive=drive
|
|
virtio-blk-pci.logical_block_size=uint16
|
|
virtio-blk-pci.physical_block_size=uint16
|
|
virtio-blk-pci.min_io_size=uint16
|
|
virtio-blk-pci.opt_io_size=uint32
|
|
virtio-blk-pci.ioeventfd=on/off
|
|
virtio-blk-pci.vectors=uint32
|
|
virtio-blk-pci.indirect_desc=on/off
|
|
virtio-blk-pci.scsi=on/off
|
|
virtio-net-pci.vectors=uint32
|
|
virtio-net-pci.indirect_desc=on/off
|
|
virtio-net-pci.csum=on/off
|
|
virtio-net-pci.guest_csum=on/off
|
|
virtio-net-pci.gso=on/off
|
|
virtio-net-pci.guest_tso4=on/off
|
|
virtio-net-pci.guest_tso6=on/off
|
|
virtio-net-pci.guest_ecn=on/off
|
|
virtio-net-pci.guest_ufo=on/off
|
|
virtio-net-pci.host_tso4=on/off
|
|
virtio-net-pci.host_tso6=on/off
|
|
virtio-net-pci.host_ecn=on/off
|
|
virtio-net-pci.host_ufo=on/off
|
|
virtio-net-pci.mrg_rxbuf=on/off
|
|
virtio-net-pci.status=on/off
|
|
virtio-net-pci.ctrl_vq=on/off
|
|
virtio-net-pci.ctrl_rx=on/off
|
|
virtio-net-pci.ctrl_vlan=on/off
|
|
virtio-net-pci.ctrl_rx_extra=on/off
|
|
virtio-net-pci.mac=macaddr
|
|
virtio-net-pci.vlan=vlan
|
|
virtio-net-pci.netdev=netdev
|
|
virtio-net-pci.x-txtimer=uint32
|
|
virtio-net-pci.x-txburst=int32
|
|
virtio-net-pci.tx=string
|