1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-06-07 14:21:55 +00:00
This commit is contained in:
Newnius 2020-05-04 00:27:02 +08:00
parent 488dfbbb2f
commit d6f6fc01f2
2 changed files with 2 additions and 13 deletions

View File

@ -84,18 +84,6 @@ func (pool *ResourcePool) start() {
pool.saveStatusHistory() pool.saveStatusHistory()
}() }()
segID := rand.Intn(pool.poolsCount)
start := &pool.pools[segID]
if start.Nodes == nil {
start = start.Next
}
for cur := start; ; {
log.Info(cur.ID)
cur = cur.Next
if cur.ID == start.ID {
break
}
}
} }
/* check dead nodes periodically */ /* check dead nodes periodically */

View File

@ -740,6 +740,7 @@ 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)
@ -786,7 +787,7 @@ func (scheduler *SchedulerFair) UpdateNextQueue() {
} }
scheduler.nextQueue = next scheduler.nextQueue = next
scheduler.queueMu.Unlock() scheduler.queueMu.Unlock()
log.Debug("updateNextQueue ->", next) log.Info("updateNextQueue ->", next)
} }
func (scheduler *SchedulerFair) Attach(GPU string, job string) { func (scheduler *SchedulerFair) Attach(GPU string, job string) {