Martin Betak has posted comments on this change. Change subject: migration: Add DynamicThrottling semaphores ......................................................................
Patch Set 3: (2 comments) https://gerrit.ovirt.org/#/c/53304/3/tests/vmUtilsTests.py File tests/vmUtilsTests.py: Line 209: self.sem._value > better avoid to access private fields (=implementation details) unless we d so e.g. expose read-only property for the semaphore value? https://gerrit.ovirt.org/#/c/53304/3/vdsm/virt/utils.py File vdsm/virt/utils.py: Line 237: # if we are increasing the bound we need to do this outside of : # context manager otherwise release() would deadlock since it also : # tries to obtain the lock > maybe better to enforce this? you mean explicitly check if set_bound is called with the semaphore being held? I really don't think that is necessary since the internal lock is acquired only for duration of methods acquire, release and set_bound respectively. This comment was mostly as note to myself why I moved the code out of the context manager on lines 231-235 in the internal implementation of set_bound that would deadlock. Clients of this class should not be affected IMO. -- To view, visit https://gerrit.ovirt.org/53304 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Betak <mbe...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Betak <mbe...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches