1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-13 07:46:43 +00:00
This commit is contained in:
2020-05-04 00:48:16 +08:00
parent 33894f4eac
commit 9ab8b7d8d2

View File

@@ -527,20 +527,10 @@ func (scheduler *SchedulerFair) AcquireResource(job Job, task Task, nodes []Node
} }
for segID, lock := range locks { for segID, lock := range locks {
log.Info("Unlock ", segID) log.Debug("Unlock ", segID)
lock.Unlock() lock.Unlock()
} }
for cur := start; ; {
log.Info("trylock ", cur.ID)
cur.Lock.Lock()
cur.Lock.Unlock()
cur = cur.Next
if cur.ID == start.ID {
break
}
}
go func(res NodeStatus) { go func(res NodeStatus) {
if len(res.Status) == 0 { if len(res.Status) == 0 {
return return
@@ -750,7 +740,6 @@ func (scheduler *SchedulerFair) UpdateNextQueue() {
Memory := 0.0001 Memory := 0.0001
start := pool.pools[0].Next start := pool.pools[0].Next
for cur := start; ; { for cur := start; ; {
log.Info(cur.ID)
cur.Lock.Lock() cur.Lock.Lock()
for _, node := range cur.Nodes { for _, node := range cur.Nodes {
CPU += float64(node.NumCPU) CPU += float64(node.NumCPU)
@@ -797,7 +786,7 @@ func (scheduler *SchedulerFair) UpdateNextQueue() {
} }
scheduler.nextQueue = next scheduler.nextQueue = next
scheduler.queueMu.Unlock() scheduler.queueMu.Unlock()
log.Info("updateNextQueue ->", next) log.Debug("updateNextQueue ->", next)
} }
func (scheduler *SchedulerFair) Attach(GPU string, job string) { func (scheduler *SchedulerFair) Attach(GPU string, job string) {