Change in ovirt-engine[master]: infra/storage: send commands to the SPM on a FIFO basis

laravot at redhat.com laravot at redhat.com
Sun Jun 5 12:42:39 UTC 2016


Liron Aravot has submitted this change and it was merged.

Change subject: infra/storage: send commands to the SPM on a FIFO basis
......................................................................


infra/storage: send commands to the SPM on a FIFO basis

The synchronized 'syncObj' object, used to serialize SPM commands from
the manager to the hypervisor is not particularly fair, which makes
these commands to arrive in random order on vdsm. This is particularly
true when a lot of commands are sent to the manager, using the API for
example. In this case, some delays may get very large.

Using a fair ReentrentLock instead of executing the code in a
synchronized block, respects the order of the commands, eliminating the
chance of starvation.

Using a reentrant lock makes it easy to report the number of threads
waiting on the lock as well.

Change-Id: I23fb85a4179c8a77bf1b3df532d43edc4207f33a
Bug-Url: https://bugzilla.redhat.com/1277057
Bug-Url: https://bugzilla.redhat.com/1282764
Signed-off-by: Tim Speetjens <tim.speetjens at redhat.com>
---
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsBrokerCommand.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsProxyData.java
2 files changed, 29 insertions(+), 13 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Liron Aravot: Verified; Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/48245
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I23fb85a4179c8a77bf1b3df532d43edc4207f33a
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tim Speetjens <tim.speetjens at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Tim Speetjens <tim.speetjens at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list