Mark Wu has posted comments on this change. Change subject: fix dataProgress of migration ......................................................................
Patch Set 2: I would prefer that you didn't submit this (2 inline comments) 'memProcessed' represents the amount of transferred memory. I think there're two problems with using 'memProcessed' to calculated the progress: 1. For an idle vm, the 'memProcessed' could be much less than memTotal due to the deduplicate mechanism in qemu. 2. For a vm under high memory pressure, the 'memProcessed' could be much more than memTotal, because qemu has to iterate to transfer the dirty pages. It these two cases, the progress calculated using 'memProcessed' is inaccurate. After changing to 'memRemaining', the progress could goes backwards, but it reflect the actual case. .................................................... File vdsm/libvirtvm.py Line 377: Line 378: if jobType == 0: Line 379: continue Line 380: Line 381: dataProgress = (100 - 100 * dataRemaining) / dataTotal \ It's wrong, should be 100 - 100 * dataRemaining / dataTotal, right? Line 382: if dataTotal else 0 Line 383: memProgress = (100 - 100 * memRemaining) / memTotal \ Line 384: if memTotal else 0 Line 385: Line 379: continue Line 380: Line 381: dataProgress = (100 - 100 * dataRemaining) / dataTotal \ Line 382: if dataTotal else 0 Line 383: memProgress = (100 - 100 * memRemaining) / memTotal \ The same issue as line 381 Line 384: if memTotal else 0 Line 385: Line 386: self._vm.log.info( Line 387: 'Migration Progress: %s seconds elapsed, ' -- To view, visit http://gerrit.ovirt.org/7914 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8ff16da7a0bfb6a28cb8bae6b127bff46575d5f6 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng <[email protected]> Gerrit-Reviewer: Mark Wu <[email protected]> Gerrit-Reviewer: ShaoHe Feng <[email protected]> Gerrit-Reviewer: Shu Ming <[email protected]> Gerrit-Reviewer: Xu He Jie <[email protected]> Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
