1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-06-07 06:11:56 +00:00

update fair

This commit is contained in:
Newnius 2020-05-30 15:16:29 +08:00
parent 7f0b3316f0
commit ba8c392888

View File

@ -133,10 +133,13 @@ func (scheduler *SchedulerFair) Start() {
minRequestGPU = needGPU
}
}
if quota, ok := scheduler.queuesQuota[bestQueue]; ok {
totalGPU -= quota.NumberGPU
}
/* if totalGPU can satisfy that job, start borrowing */
if bestQueue != "" && totalGPU >= minRequestGPU {
log.Info("start borrow phase")
log.Info(totalGPU, " still need ", minRequestGPU)
log.Info(bestQueue, ": ", "total=", totalGPU, " still need ", minRequestGPU)
for {
/* if all satisfied, break */
if minRequestGPU == 0 {