Change in vdsm[master]: vm: hyperv: hyperv enlightenment optimizations

fromani at redhat.com fromani at redhat.com
Thu Jun 26 07:14:59 UTC 2014


Francesco Romani has uploaded a new change for review.

Change subject: vm: hyperv: hyperv enlightenment optimizations
......................................................................

vm: hyperv: hyperv enlightenment optimizations

This patch the hyperv enlightenment optimizations.
The optimizations are both for stability and for performance, and they
are added on top of the HyperV support.

The parameters are hardcoded and not externally configurable because
they are not supposed to be changed very often, if changed at all;
moreover, this patch already implements the optimal recommended settings.

Change-Id: Ia10cb4ce254b6e6f560c045aff9e68846fe4771f
Bug-Url: https://bugzilla.redhat.com/1083529
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M tests/vmTests.py
M vdsm/virt/vm.py
2 files changed, 18 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/34/29234/1

diff --git a/tests/vmTests.py b/tests/vmTests.py
index 7ee2eb8..9317887 100644
--- a/tests/vmTests.py
+++ b/tests/vmTests.py
@@ -327,6 +327,8 @@
                   <acpi/>
                   <hyperv>
                          <relaxed state="on"/>
+                         <vapic state="on"/>
+                         <spinlocks retries="8191" state="on"/>
                   </hyperv>
             </features>"""
         conf = {'hypervEnable': 'true'}
@@ -382,7 +384,7 @@
     def testHyperVClockXML(self):
         clockXML = """
             <clock adjustment="-3600" offset="variable">
-                <timer name="rtc" tickpolicy="catchup" track="guest"/>
+                <timer name="hypervclock" tickpolicy="catchup"/>
                 <timer name="pit" tickpolicy="delay"/>
                 <timer name="hpet" present="no"/>
             </clock>"""
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index ec8ca12..4f3c531 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -717,13 +717,20 @@
         <clock offset="variable" adjustment="-3600">
             <timer name="rtc" tickpolicy="catchup">
         </clock>
+
+        for hyperv:
+        <clock offset="variable" adjustment="-3600">
+            <timer name="hypervclock" tickpolicy="catchup">
+        </clock>
         """
+
+        clockName = 'hypervclock' if self._isHyperV() else 'rtc'
+        # 'hypervclock' does not support the 'track' attribute.
+        # libvirt docs is not very clear here.
 
         m = XMLElement('clock', offset='variable',
                        adjustment=str(self.conf.get('timeOffset', 0)))
-        rtc = m.appendChildWithArgs('timer', name='rtc', tickpolicy='catchup')
-        if utils.tobool(self.conf.get('hypervEnable', 'false')):
-            rtc.setAttrs(track='guest')
+        m.appendChildWithArgs('timer', name=clockName, tickpolicy='catchup')
         m.appendChildWithArgs('timer', name='pit', tickpolicy='delay')
 
         if self.arch == caps.Architecture.X86_64:
@@ -841,6 +848,11 @@
             hyperv.appendChildWithArgs('relaxed', state='on')
             # turns off an internal Windows watchdog, and by doing so avoids
             # some high load BSODs.
+            hyperv.appendChildWithArgs('vapic', state='on')
+            hyperv.appendChildWithArgs(
+                'spinlocks', state='on', retries='8191')
+            # performance optimization flags, that can improve the performance
+            # by 10% to much more (in extreme cases of resources overcommit).
 
     def appendCpu(self):
         """


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia10cb4ce254b6e6f560c045aff9e68846fe4771f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>


More information about the vdsm-patches mailing list