Change in vdsm[master]: migration: Add DynamicThrottling semaphores
mbetak at redhat.com
mbetak at redhat.com
Wed Feb 17 13:21:19 UTC 2016
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 <mbetak at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list