From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: virt: periodic: support for exclusive operations
......................................................................
virt: periodic: support for exclusive operations
One "exclusive operation" is one operation that guarantee
that any given time either none or exactly one instance of
the callable are being executed, regardless of its state (perhaps
running fine, perhaps slow, perhaps blocked).
Doing like this we can avoid that more than one instance somehow
enters one critical region, exhausting limited system resources
(libvirt worker threads, netlink socket connections).
If we enable this flag, the executor behaves much like a regular thread
pool. Please also note that the concept of exclusive operation is
related, but different, to the timeout.
The timeout controls when a slow worker should be discarded, while
the exclusive flag controls the new attempt to reschedule one periodic
operation. You use the timeout to control when/if to give up, and the
exclusive flag to control how aggressively retry.
Up until now, there it was no need for this `exclusive` flag, because
all the periodic operations were considered important enough to deserve
aggressive rescheduling. The exception is the HostMonitor operations,
for which we can afford delayed reporting of the state, and for which
we discovered that, because of a still not confirmed underlying netlink
issue, aggressively retrying causes more harm than benefits.
In the future, we may want reevaluate if other periodic operations
may benefit of less aggressive scheduling.
Change-Id: I2cbb708a246c25065a46688de739ea0ec4f52c77
Related-To:
https://bugzilla.redhat.com/1419856
Backport-To: 4.1
Backport-To: 4.0
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M lib/vdsm/virt/periodic.py
M tests/periodic_test.py
2 files changed, 62 insertions(+), 4 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Dan Kenigsberg: Looks good to me, approved
Francesco Romani: Verified
Milan Zamazal: Looks good to me, but someone else must approve
--
To view, visit
https://gerrit.ovirt.org/73534
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2cbb708a246c25065a46688de739ea0ec4f52c77
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzamazal(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>