Martin Sivák has uploaded a new change for review.

Change subject: engine: Substract pendingVmSize from maxSchedulingMemory
......................................................................

engine: Substract pendingVmSize from maxSchedulingMemory

maxSchedulingMEmory should represent the amount of available
memory on host. If a migration is in progress we should
substract the memory that will be used by the VM in transition.

Change-Id: I87a0a77ae40049f18fb40d803ab58d5a7bda60f0
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1083926
Signed-off-by: Martin Sivak <msi...@redhat.com>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/07/26707/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
index d8a970e..96ad05c 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
@@ -1274,7 +1274,7 @@
     public void calculateFreeVirtualMemory() {
         if (getMemCommited() != null && getPhysicalMemMb() != null && 
getReservedMem() != null) {
             maxSchedulingMemory = (getMaxVdsMemoryOverCommit() * 
getPhysicalMemMb() / 100.0f) -
-                    (getMemCommited() + getReservedMem());
+                    (getMemCommited() + getReservedMem() - 
getPendingVmemSize());
             // avoid negative values
             maxSchedulingMemory = maxSchedulingMemory > 0 ? 
maxSchedulingMemory : 0;
         }


-- 
To view, visit http://gerrit.ovirt.org/26707
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I87a0a77ae40049f18fb40d803ab58d5a7bda60f0
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msi...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to