Alona Kaplan has posted comments on this change.

Change subject: engine: scheduling host- find free VF
......................................................................


Patch Set 14:

(3 comments)

As Roy and Michal suggested, the vfs scheduling result is now stored in a 
singleton class called VfScheduler.

All the vfs scheduling logic was moved to the new class and
a test class was added.

https://gerrit.ovirt.org/#/c/37931/14//COMMIT_MSG
Commit Message:

Line 5: CommitDate: 2015-04-16 09:03:50 +0300
Line 6: 
Line 7: engine: scheduling host- find free VF
Line 8: 
Line 9: A VF is marked as suitable for a passthrough vnic in case:
> What does VF and PF stand for?
http://wiki.ovirt.org/Feature/SR-IOV
VF- virtual function
PF- physical function

If a vnic is marked as 'passthrough' the scheduling should find a host with a 
suitable VF. Please refer to the feature page for more details.
Line 10: 1. It is free (reported by vdsCaps, not attached to vm, doesn't have 
vlan
Line 11: device or network attached to it).
Line 12: 2. Its PF has the vnic's network (or label) in it's vf's configuration.
Line 13: 


https://gerrit.ovirt.org/#/c/37931/14/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/PolicyUnitImpl.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/PolicyUnitImpl.java:

Line 157:         this.memoryChecker = memoryChecker;
Line 158: 
Line 159:     }
Line 160: 
Line 161:     public void setHostToVnicToVfMap(Map<Guid, Map<Guid, String>> 
hostToVnicToVfMap) {
> Why do all policy units need such a map? PolicyUnitImpl is the base class f
I had to do it because of design restrictions. But since the 
'hostToVnicToVfMap' was moved to a singleton class, as you suggested, this code 
was removed.
Line 162:         this.hostToVnicToVfMap = hostToVnicToVfMap;
Line 163:     }


https://gerrit.ovirt.org/#/c/37931/14/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java:

Line 256:             List<Guid> hostWhiteList,
Line 257:             Guid destHostId,
Line 258:             List<String> messages,
Line 259:             VdsFreeMemoryChecker memoryChecker,
Line 260:             Map<Guid, String> passthroughVnicToVfMap,
> I could accept a change that puts additional information to the SchedulingR
Now, in addition to scheduling a host, the scheduler also schedules virtual 
functions.
'passthroughVnicToVfMap' is used as the vfs scheduling result holder.
Instead, I could expand the result to contain host and vfs.

But since I followed Roy's and Michal's suggestion, I stored the vfs scheduling 
result in a singleton class called VfScheduler, and this extra parameter was 
removed.
Line 261:             String correlationId) {
Line 262:         clusterLockMap.putIfAbsent(cluster.getId(), new Semaphore(1));
Line 263:         try {
Line 264:             log.debug("Scheduling started, correlation Id: {}", 
correlationId);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I58c7aaa7a5a7160132418c397840583209aa8371
Gerrit-PatchSet: 14
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Martin Betak <mbe...@redhat.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to