Mark Wu has posted comments on this change.
Change subject: add verb for vdsm to tuneCpu params
......................................................................
Patch Set 7: I would prefer that you didn't submit this
(5 inline comments)
....................................................
File vdsm_api/vdsmapi-schema.json
Line 5111: # @vcpu_quota: Max bandwidth vCPU can consume
Line 5112: #
Line 5113: # @emulator_quota: Max bandwidth of the emulator thread
Line 5114: #
Line 5115: # @emulator_period: The enforcement period of emulator_period
Should be "The enforcement period of emulator_quota", right?
Line 5116: #
Line 5117: # Since: 4.10.0
Line 5118: ##
Line 5119: {'type': 'TuneCpuParams',
Line 5124: # @VM.tuneCpu:
Line 5125: #
Line 5126: # Tune cpu absolute max proportion and relative share.
Line 5127: #
Line 5128: # @TuneCpuParams: Tunning parameters for vCPU
I think vCPU is not accurate here, because it also covers emulator thread. So how about
just 'Tunning parameters for guest CPU usage'
Line 5129: #
Line 5130: # Since: 4.10.0
Line 5131: ##
Line 5132: {'command': {'class': 'VM', 'name':
'tuneCpu'},
....................................................
File vdsm/libvirtvm.py
Line 1331: try:
Line 1332: self._dom.setSchedulerParameters({'cpu_shares':
cpuShare})
Line 1333: except:
Line 1334: self.log.warning('failed to set Vm niceness',
exc_info=True)
Line 1335: self.conf['cpu_shares'] = cpuShare
Since you add a new dict conf['cpuTune'], you should put the value in the dict.
And the change on vm.conf will change the return of getVmStats(), so you need update
schema for it.
Line 1336: self.saveState()
Line 1337:
Line 1338: def _run(self):
Line 1339: self.log.info("VM wrapper has started")
Line 1902: e.message, exc_info=True)
Line 1903: return errCode['tunecpuErr']
Line 1904: except LookupError:
Line 1905: self.log.error('TuneCpu failed: unrecongnized params',
Line 1906: exc_info=True)
if the exception is caused by an unknown parameter, it's better to log the parameters
together.
Line 1907: return errCode['tunecpuErr']
Line 1908:
Line 1909: def _runMerge(self):
Line 1910: for mergeStatus in self.conf.get('liveMerge', []):
Line 1904: except LookupError:
Line 1905: self.log.error('TuneCpu failed: unrecongnized params',
Line 1906: exc_info=True)
Line 1907: return errCode['tunecpuErr']
Line 1908:
Merge this line with line 1903?
Line 1909: def _runMerge(self):
Line 1910: for mergeStatus in self.conf.get('liveMerge', []):
Line 1911: if mergeStatus['status'] != MERGESTATUS.NOT_STARTED:
Line 1912: continue
--
To view, visit
http://gerrit.ovirt.org/7492
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I09e02e09ef06ad6de45be75c3f2f913a3025750f
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Adam Litke <agl(a)us.ibm.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck(a)redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhornyak(a)redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Ryan Harper <ryanh(a)us.ibm.com>
Gerrit-Reviewer: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Zhu Bo <bozhu(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server