1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-16 16:36:45 +00:00
This commit is contained in:
2020-05-27 13:43:27 +08:00
parent c3f05141ee
commit ab0c1882cc
2 changed files with 9 additions and 4 deletions

View File

@@ -67,6 +67,11 @@ func fastBestFit(nodes []NodeStatus, tasks []Task) Allocation {
for _, task := range tasks {
minCost := math.MaxFloat64
var best *NodeStatus
if task.IsPS {
eva.factorPack = -1.0
} else {
eva.factorPack = 1.0
}
for i, node := range nodes {
if _, ok := allocation.TasksOnNode[node.ClientID]; !ok {
allocation.TasksOnNode[node.ClientID] = []Task{}