Change in vdsm[master]: interface xml: allow Engine to specify number of queues

danken at redhat.com danken at redhat.com
Wed Mar 5 10:42:44 UTC 2014


Dan Kenigsberg has uploaded a new change for review.

Change subject: interface xml: allow Engine to specify number of queues
......................................................................

interface xml: allow Engine to specify number of queues

If a vNIC is used for in-host communication between VMs, its throughput
would gain if it is allocated with multiple queues, numbering as the
vCPUs of the VM. This comes with a price of pinning host memory for this
purpose.

This patch exposes the "queues" per-device custom property which can be
set in a vNIC profile in Engine.

Change-Id: I83e129e3c6900190f9b5d863d832745833fe2699
Signed-off-by: Dan Kenigsberg <danken at redhat.com>
---
M tests/vmTests.py
M vdsm/vm.py
2 files changed, 9 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/90/25390/1

diff --git a/tests/vmTests.py b/tests/vmTests.py
index 8548808..8b65e06 100644
--- a/tests/vmTests.py
+++ b/tests/vmTests.py
@@ -400,7 +400,7 @@
                 <source bridge="ovirtmgmt"/>
                 <filterref filter="no-mac-spoofing"/>
                 <boot order="1"/>
-                <driver name="vhost"/>
+                <driver name="vhost" queues="7"/>
                 <tune>
                     <sndbuf>0</sndbuf>
                 </tune>
@@ -416,7 +416,8 @@
                'bootOrder': '1', 'filter': 'no-mac-spoofing',
                'specParams': {'inbound': {'average': '1000', 'peak': '5000',
                                           'burst': '1024'},
-                              'outbound': {'average': '128', 'burst': '256'}}}
+                              'outbound': {'average': '128', 'burst': '256'}},
+               'custom': {'queues': '7'}}
 
         self.conf['custom'] = {'vhost': 'ovirtmgmt:true', 'sndbuf': '0'}
         iface = vm.NetworkInterfaceDevice(self.conf, self.log, **dev)
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 549421c..467e8a5 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -1361,6 +1361,11 @@
             self.driver['name'] = vhosts.get(self.network, False)
 
         try:
+            self.driver['queues'] = self.custom['queues']
+        except KeyError:
+            pass    # interface queues not specified
+
+        try:
             self.sndbufParam = self.conf['custom']['sndbuf']
         except KeyError:
             pass    # custom_sndbuf not specified
@@ -1388,7 +1393,7 @@
             <mac address="aa:bb:dd:dd:aa:bb"/>
             <model type="virtio"/>
             <source bridge="engine"/>
-            [<driver name="vhost/qemu"/>]
+            [<driver name="vhost/qemu" queues="int"/>]
             [<filterref filter='filter name'/>]
             [<tune><sndbuf>0</sndbuf></tune>]
             [<link state='up|down'/>]


-- 
To view, visit http://gerrit.ovirt.org/25390
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I83e129e3c6900190f9b5d863d832745833fe2699
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken at redhat.com>


More information about the vdsm-patches mailing list