mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-13 07:46:43 +00:00
[bugfix] preempt, avoid deadlock
This commit is contained in:
@@ -108,10 +108,6 @@ func (scheduler *SchedulerPriority) Start() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
before := InstanceOfResourcePool().UsingGPU
|
|
||||||
log.Info("Start preempt ", preempted.Name)
|
|
||||||
scheduler.Stop(preempted.Name)
|
|
||||||
|
|
||||||
/* Remove from history */
|
/* Remove from history */
|
||||||
idx := -1
|
idx := -1
|
||||||
for i, job := range scheduler.history {
|
for i, job := range scheduler.history {
|
||||||
@@ -125,6 +121,10 @@ func (scheduler *SchedulerPriority) Start() {
|
|||||||
}
|
}
|
||||||
scheduler.historyMu.Unlock()
|
scheduler.historyMu.Unlock()
|
||||||
|
|
||||||
|
before := InstanceOfResourcePool().UsingGPU
|
||||||
|
log.Info("Start preempt ", preempted.Name)
|
||||||
|
scheduler.Stop(preempted.Name)
|
||||||
|
|
||||||
/* add back */
|
/* add back */
|
||||||
idx = len(scheduler.queue)
|
idx = len(scheduler.queue)
|
||||||
for i, job := range scheduler.queue {
|
for i, job := range scheduler.queue {
|
||||||
|
|||||||
Reference in New Issue
Block a user