cli: Add --clock timer[0-9]*.catchup options

Added:
-timer[0-9]*.catchup.threshold
-timer[0-9]*.catchup.slew
-timer[0-9]*.catchup.limit

Catchup attributes need timer with assigned tickpolicy=catchup.

XML Mapping:

<clock>
  ...
  <catchup threshold="X" slew="X" limit="X"/>
  ...
</clock>

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@gmail.com>
This commit is contained in:
Athina Plaskasoviti 2019-08-17 19:10:03 +03:00 committed by Cole Robinson
parent cc60d558c0
commit 2e49041d85
4 changed files with 16 additions and 1 deletions

View File

@ -160,6 +160,9 @@
<timer name="rtc" track="wall"/>
<timer name="tsc" frequency="10"/>
<timer name="tsc" mode="emulate"/>
<timer name="rtc" tickpolicy="catchup">
<catchup threshold="123" slew="120" limit="10000"/>
</timer>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
@ -397,6 +400,9 @@
<timer name="rtc" track="wall"/>
<timer name="tsc" frequency="10"/>
<timer name="tsc" mode="emulate"/>
<timer name="rtc" tickpolicy="catchup">
<catchup threshold="123" slew="120" limit="10000"/>
</timer>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>

View File

@ -519,7 +519,7 @@ memnode0.cellid=1,memnode0.mode=strict,memnode0.nodeset=2
--blkiotune weight=100,device_path=/home/test/1.img,device_weight=200,read_bytes_sec=10000,write_bytes_sec=10000,read_iops_sec=20000,write_iops_sec=20000
--memorybacking size=1,unit='G',nodeset=0,1,nosharepages=yes,locked=yes,discard=yes,allocation.mode=immediate,access_mode=shared,source_type=file,hugepages.page.size=12,hugepages.page1.size=1234,hugepages.page1.unit=MB,hugepages.page1.nodeset=2
--features acpi=off,eoi=on,privnet=on,hyperv_synic=on,hyperv_reset=on,hyperv_spinlocks=on,hyperv_spinlocks_retries=5678,vmport=off,pmu=off,vmcoreinfo=on,kvm_hidden=off,hyperv_vapic=on
--clock offset=utc,hpet_present=no,rtc_tickpolicy=merge,timer2.name=hypervclock,timer3.name=pit,timer1.present=yes,timer3.tickpolicy=delay,timer2.present=no,timer4.name=rtc,timer5.name=tsc,timer6.name=tsc,timer4.track=wall,timer5.frequency=10,timer6.mode=emulate
--clock offset=utc,hpet_present=no,rtc_tickpolicy=merge,timer2.name=hypervclock,timer3.name=pit,timer1.present=yes,timer3.tickpolicy=delay,timer2.present=no,timer4.name=rtc,timer5.name=tsc,timer6.name=tsc,timer4.track=wall,timer5.frequency=10,timer6.mode=emulate,timer7.name=rtc,timer7.tickpolicy=catchup,timer7.catchup.threshold=123,timer7.catchup.slew=120,timer7.catchup.limit=10000
--sysinfo type=smbios,bios_vendor="Acme LLC",bios_version=1.2.3,bios_date=01/01/1970,bios_release=10.22
--sysinfo type=smbios,system_manufacturer="Acme Inc.",system_product=Computer,system_version=3.2.1,system_serial=123456789,system_uuid=00000000-1111-2222-3333-444444444444,system_sku=abc-123,system_family=Server
--sysinfo type=smbios,baseBoard_manufacturer="Acme Corp.",baseBoard_product=Motherboard,baseBoard_version=A01,baseBoard_serial=1234-5678,baseBoard_asset=Tag,baseBoard_location=Chassis

View File

@ -2604,6 +2604,12 @@ class ParserClock(VirtCLIParser):
find_inst_cb=cls.timer_find_inst_cb)
cls.add_arg("timer[0-9]*.frequency", "frequency",
find_inst_cb=cls.timer_find_inst_cb)
cls.add_arg("timer[0-9]*.catchup.threshold", "threshold",
find_inst_cb=cls.timer_find_inst_cb)
cls.add_arg("timer[0-9]*.catchup.slew", "slew",
find_inst_cb=cls.timer_find_inst_cb)
cls.add_arg("timer[0-9]*.catchup.limit", "limit",
find_inst_cb=cls.timer_find_inst_cb)
################

View File

@ -16,6 +16,9 @@ class _ClockTimer(XMLBuilder):
track = XMLProperty("./@track")
mode = XMLProperty("./@mode")
frequency = XMLProperty("./@frequency", is_int=True)
threshold = XMLProperty("./catchup/@threshold", is_int=True)
slew = XMLProperty("./catchup/@slew", is_int=True)
limit = XMLProperty("./catchup/@limit", is_int=True)
class DomainClock(XMLBuilder):