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

update fair

This commit is contained in:
Newnius 2020-05-28 23:28:09 +08:00
parent cfd78bbfe8
commit 68e6ade248

View File

@ -125,6 +125,11 @@ func (scheduler *SchedulerFair) Start() {
if _, ok := scheduler.queuesQuota[queue]; !ok {
scheduler.queuesQuota[queue] = &ResourceCount{}
}
/* one cannot borrow more before he has cleared his IOUs */
if len(scheduler.IOUs[queue]) > 0 {
continue
}
needGPU := numberGPUtmp*1000 - scheduler.queuesQuota[queue].NumberGPU
/* the less, the better */
if bestQueue == "" || needGPU < minRequestGPU {