Francesco Romani has posted comments on this change. Change subject: WIP: RFC: track domain availability ......................................................................
Patch Set 1: (3 comments) https://gerrit.ovirt.org/#/c/44544/1/vdsm/virt/periodic.py File vdsm/virt/periodic.py: Line 278: # needlessly overload libvirt. Line 279: self._vm.log.warning('could not run %s on %s: domain was busy', Line 280: self, self._vm.id) Line 281: else: Line 282: self._execute() this can raise too Line 283: self._teardown() Line 284: Line 285: def ondiscard(self): Line 286: self._teardown() Line 285: def ondiscard(self): Line 286: self._teardown() Line 287: Line 288: def _setup(self): Line 289: self._tracker.acquire(self._vm.id) please document why we need this ugliness Line 290: Line 291: def _teardown(self): Line 292: try: Line 293: self._tracker.release(self._vm.id) https://gerrit.ovirt.org/#/c/44544/1/vdsm/virt/sampling.py File vdsm/virt/sampling.py: Line 513: def __call__(self): Line 514: timestamp = self._stats_cache.clock() Line 515: # we are deep in the hot path. bool(ExpiringCache) Line 516: # *is* costly so we should avoid it if we can. Line 517: available, total = self._tracker.resources() move into an helper and/or document the steps Line 518: fast_path = ( Line 519: self._sampling.acquire(blocking=False) Line 520: and len(available) == len(total) Line 521: and not self._skip_doms) -- To view, visit https://gerrit.ovirt.org/44544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1b1d5173bac8e288474581092b8132dc0df03ad4 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches