Michael Kublin has posted comments on this change.

Change subject: engine: Compare and set instead of updateVdsDynamic in VM 
scenarious
......................................................................


Patch Set 1: (8 inline comments)

....................................................
File backend/manager/dbscripts/vds_sp.sql
Line 907:       WHERE vds_id = v_vds_guid;
Line 908: END; $procedure$
Line 909: LANGUAGE plpgsql;
Line 910: 
Line 911: Create or replace FUNCTION UpdateSmartUpdatePartialVds(
I like this, but if you will provide a better I can switch to it
Line 912:         v_vds_guid UUID,
Line 913:         v_vmCount INTEGER,
Line 914:         v_pendingVcpusCount INTEGER,
Line 915:         v_pendingVmemSize INTEGER,


Line 926:         sign = 1;
Line 927:       ELSE 
Line 928:         sign = -1;
Line 929:       END IF;
Line 930:         
Done
Line 931:     UPDATE vds_dynamic
Line 932:     SET
Line 933:       vm_count = GREATEST(vm_count + v_vmCount, 0),
Line 934:       pending_vcpus_count = GREATEST(pending_vcpus_count + 
v_pendingVcpusCount, 0),


Line 931:     UPDATE vds_dynamic
Line 932:     SET
Line 933:       vm_count = GREATEST(vm_count + v_vmCount, 0),
Line 934:       pending_vcpus_count = GREATEST(pending_vcpus_count + 
v_pendingVcpusCount, 0),
Line 935:       pending_vmem_size = GREATEST(pending_vmem_size + 
v_pendingVmemSize, 0),
I don't know, never was added, so I keep current behaviour .
@Omer, @Roy - should be added?
Line 936:       mem_commited = GREATEST(mem_commited + sign * 
(abs(v_memCommited) + guest_overhead), 0),
Line 937:       vms_cores_count = GREATEST(vms_cores_count + v_vmsCoresCount, 0)
Line 938:     WHERE vds_id = v_vds_guid;
Line 939: END; $procedure$


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java
Line 325
Line 326
Line 327
Line 328
Line 329
No, it was based on values which were retrieved from vds


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsDynamic.java
Line 131:         reserved_mem = 1024;
Line 132:         pending_vcpus_count = 0;
Line 133:         pending_vmem_size = 0;
Line 134:         transparentHugePagesState = 
VdsTransparentHugePagesState.Never;
Line 135:         vm_count =0;
Done
Line 136:         vms_cores_count = 0;
Line 137:         guest_overhead = 0;
Line 138:     }
Line 139: 


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDynamicDAO.java
Line 26:      * @param pendingVmemSize - a new value will be 
GREATEST(pending_vmem_size + pendingVmemSize, 0)
Line 27:      * @param memCommited - will decrease or increase value of 
mem_commited by ABS(memCommited) + guest_overhead
Line 28:      * @param vmsCoresCount - a new value will be 
GREATEST(vms_cores_count + v_vmsCoresCount, 0)
Line 29:      */
Line 30:     void smartUpdatePartialVds(Guid id, int vmCount, int 
pendingVcpusCount, int pendingVmemSize, int memCommited, int vmsCoresCount);
Maybe.


....................................................
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
Line 1615
Line 1616
Line 1617
Line 1618
Line 1619
In the feature patches I will change most of the fields of VdsDynamic from 
Integer to int, also this value can not be null, so I removed this check


....................................................
Commit Message
Line 3: AuthorDate: 2013-04-07 14:25:24 +0300
Line 4: Commit:     Michael Kublin <[email protected]>
Line 5: CommitDate: 2013-04-07 16:50:38 +0300
Line 6: 
Line 7: engine: Compare and set instead of updateVdsDynamic in VM scenarious
Done
Line 8: 
Line 9: The following patch should solve a following problems:
Line 10: 1. Deadlock between RunVmCommandBase.decreasePendingVms and 
VdsUpdateRuntimeInfo.AfterRefreshTreatment
Line 11:    line with code: 
ResourceManager.getInstance().getEventListener().processOnVmPoweringUp(...);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I363afc5c3411b0c13e6d6c9ed5b16004738b6ca7
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Michael Kublin <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to