Change in vdsm[master]: virt: migration: add monitor thread control loop
danken at redhat.com
danken at redhat.com
Mon Jun 9 16:18:56 UTC 2014
Dan Kenigsberg has posted comments on this change.
Change subject: virt: migration: add monitor thread control loop
......................................................................
Patch Set 17: Code-Review-1
(1 comment)
http://gerrit.ovirt.org/#/c/25976/17/vdsm/virt/migration.py
File vdsm/virt/migration.py:
Line 426: return 100
Line 427: progress = 100 - 100 * remaining / total if total else 0
Line 428: return progress if (progress < 100) else 99
Line 429:
Line 430: if step % self._MONITOR_INTERVAL == 0:
0 is still a documented value, but it is going to cause ZeroDivisionError if used here.
Also, _MONITOR_INTERVAL is in seconds. step is in _MONITOR_TICK. I am not sure what you meant by dividing the two.
Come to think of it: have you considered to use AdvancedStatsFunction? It allows one thread to sample different properties in different frequencies.
Line 431: (jobType, timeElapsed, _,
Line 432: dataTotal, dataProcessed, dataRemaining,
Line 433: memTotal, memProcessed, memRemaining,
Line 434: fileTotal, fileProcessed, _) = self._vm._dom.jobInfo()
--
To view, visit http://gerrit.ovirt.org/25976
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie422bead060c8ba2bfd4bfada522b91d56697841
Gerrit-PatchSet: 17
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list