Roy Golan has posted comments on this change.
Change subject: core: throttle running of VMs (#843058)
......................................................................
Patch Set 5: (3 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java
Line 51:
Line 52: private static Log log = LogFactory.getLog(RunVmCommandBase.class);
Line 53: protected static final HashMap<Guid, Integer>
_vds_pending_vm_count = new HashMap<Guid, Integer>();
Line 54: protected final Lock decreaseLock = new ReentrantLock();
Line 55: protected final Condition decreased = decreaseLock.newCondition();
when will we have cluster solution and how will it affect running a VM?
I am not introducing a "new" lock. just replaced the keyword "synchronized"
with the lock object so I can have a Condition object.
Line 56: private VdsSelector privateVdsSelector;
Line 57: protected boolean _isRerun = false;
Line 58: protected VDS _destinationVds;
Line 59: private SnapshotsValidator snapshotsValidator=new
SnapshotsValidator();
Line 411: vds.getvds_name(),
vds.getpending_vcpus_count(), getVm().getvm_name());
Line 412: log.debugFormat("DecreasePendingVms::Decreasing
vds {0} pending vmem size, now {1}. Vm: {2}",
Line 413: vds.getvds_name(),
vds.getpending_vmem_size(), getVm().getvm_name());
Line 414: }
Line 415: }
eventhough nothing has change I want to continue.
Line 416: decreased.signal();
Line 417: } finally {
Line 418: decreaseLock.unlock();
Line 419: }
Line 424: * the DecreasePendingVms event.
Line 425: * @see VdsEventListener
Line 426: * @See VdsUpdateRunTimeInfo
Line 427: */
Line 428: @Override
I want to signal and wouldn't be able to do it with lock util.
Line 429: public void throttle(Guid vdsId) {
Line 430: if (log.isDebugEnabled()) {
Line 431: log.debug("try to wait for te engine update the host
memory and cpu stats");
Line 432: }
--
To view, visit http://gerrit.ovirt.org/7204
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I076ede6cba919bc61f7546d7b29ef436eb6d3375
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches