Change in vdsm[master]: vm: implement recommended clock settings

fromani at redhat.com fromani at redhat.com
Fri Jan 24 12:52:06 UTC 2014


Francesco Romani has uploaded a new change for review.

Change subject: vm: implement recommended clock settings
......................................................................

vm: implement recommended clock settings

A new set of recommended clock settings emerged as follows:

  <clock ...>
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
  </clock>

THose settings are recommended by both libvirt and qemu developers,
and they apply for all guest OSes.
Some of them don't affect some OSes, but in those cases they are harmless.

This patch updates the XML generation according with
the new recommendations.

Change-Id: Icb0752e54a4cb9ff609b8ddfaf5c8fe2ed5b9e72
Bug-Url: https://bugzilla.redhat.com/1053846
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M tests/vmTests.py
M tests/vmTestsData.py
M vdsm/vm.py
3 files changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/63/23663/1

diff --git a/tests/vmTests.py b/tests/vmTests.py
index 6215041..1e0a3f6 100644
--- a/tests/vmTests.py
+++ b/tests/vmTests.py
@@ -214,6 +214,8 @@
         clockXML = """
             <clock adjustment="-3600" offset="variable">
                 <timer name="rtc" tickpolicy="catchup"/>
+                <timer name="pit" tickpolicy="delay"/>
+                <timer name="hpet" present="no"/>
             </clock>"""
         self.conf['timeOffset'] = '-3600'
         domxml = vm._DomXML(self.conf, self.log,
diff --git a/tests/vmTestsData.py b/tests/vmTestsData.py
index b75c9dc..befa687 100644
--- a/tests/vmTestsData.py
+++ b/tests/vmTestsData.py
@@ -73,6 +73,8 @@
                 </sysinfo>
                 <clock adjustment="0" offset="variable">
                     <timer name="rtc" tickpolicy="catchup"/>
+                    <timer name="pit" tickpolicy="delay"/>
+                    <timer name="hpet" present="no"/>
                 </clock>
                 <features>
                     <acpi/>
@@ -133,6 +135,8 @@
                 </os>
                 <clock adjustment="0" offset="variable">
                     <timer name="rtc" tickpolicy="catchup"/>
+                    <timer name="pit" tickpolicy="delay"/>
+                    <timer name="hpet" present="no"/>
                 </clock>
                 <cputune/>
                 <cpu>
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 7c2d496..3aefb83 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -969,8 +969,9 @@
 
         m = XMLElement('clock', offset='variable',
                        adjustment=str(self.conf.get('timeOffset', 0)))
-        if utils.tobool(self.conf.get('tdf', True)):
-            m.appendChildWithArgs('timer', name='rtc', tickpolicy='catchup')
+        m.appendChildWithArgs('timer', name='rtc', tickpolicy='catchup')
+        m.appendChildWithArgs('timer', name='pit', tickpolicy='delay')
+        m.appendChildWithArgs('timer', name='hpet', present='no')
 
         self.dom.appendChild(m)
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb0752e54a4cb9ff609b8ddfaf5c8fe2ed5b9e72
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