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-28 23:06:13 +08:00
parent c2e5bc13a1
commit 6cae5aac0d

View File

@ -134,8 +134,8 @@ func (scheduler *SchedulerFair) Start() {
}
}
/* if totalGPU can satisfy that job, start borrowing */
log.Info(totalGPU, minRequestGPU)
if bestQueue != "" && totalGPU >= minRequestGPU {
log.Info(totalGPU, minRequestGPU)
for {
/* if all satisfied, break */
if minRequestGPU == 0 {
@ -190,6 +190,7 @@ func (scheduler *SchedulerFair) Start() {
IOU = scheduler.IOUs[bestQueue][queue]
}
IOU.NumberGPU += minRequestGPU
minRequestGPU = 0
scheduler.queuesQuota[bestQueue].NumberGPU += minRequestGPU
log.Info(bestQueue, " borrow ", minRequestGPU, " from ", queue, " now ", scheduler.queuesQuota[bestQueue].NumberGPU)
break