From 7183bd9a8fa75c0ee6e5efe095ec4a7ddb4ec4b8 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Fri, 10 Oct 2014 04:05:44 +0200 Subject: [PATCH] add iothread/dataplane support new config option: iothread: 1|0 This enable iothread/dataplane support, to improve io performance on fast storages Currently block jobs don't work yet, it's planned for qemu 2.2. So it's better to not expose yet this option in gui. Signed-off-by: Alexandre Derumier --- PVE/QemuServer.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 20581315..8abeb925 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -152,6 +152,12 @@ mkdir $lock_dir; my $pcisysfs = "/sys/bus/pci"; my $confdesc = { + iothread => { + optional => 1, + type => 'boolean', + description => "Enable iothread dataplane.", + default => 0, + }, onboot => { optional => 1, type => 'boolean', @@ -1090,6 +1096,7 @@ sub print_drivedevice_full { if ($drive->{interface} eq 'virtio') { my $pciaddr = print_pci_addr("$drive->{interface}$drive->{index}", $bridges); $device = "virtio-blk-pci,drive=drive-$drive->{interface}$drive->{index},id=$drive->{interface}$drive->{index}$pciaddr"; + $device .= ",iothread=iothread0" if $conf->{iothread}; } elsif ($drive->{interface} eq 'scsi') { $maxdev = ($conf->{scsihw} && ($conf->{scsihw} !~ m/^lsi/)) ? 256 : 7; my $controller = int($drive->{index} / $maxdev); @@ -2438,6 +2445,8 @@ sub config_to_command { push @$cmd, '-smbios', "type=1,$conf->{smbios1}"; } + push @$cmd, '-object', "iothread,id=iothread0" if $conf->{iothread}; + if ($q35) { # the q35 chipset support native usb2, so we enable usb controller # by default for this machine type