1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-16 00:26:43 +00:00

consider bw when allocatig, enable preempt switcher

This commit is contained in:
2020-08-12 21:09:18 +08:00
parent 00f69969ce
commit 7c6a3ed987
9 changed files with 68 additions and 23 deletions

View File

@@ -17,7 +17,7 @@ type SchedulerPriority struct {
schedulingJobs map[string]bool
schedulingMu sync.Mutex
jobMasters map[string]*JobManager
jobMasters map[string]*JobManager
enabled bool
parallelism int
}
@@ -68,7 +68,7 @@ func (scheduler *SchedulerPriority) Start() {
go func() {
jm.start()
}()
} else {
} else if InstanceOfConfiguration().PreemptEnabled {
/* start preempt */
var jobs []Job
preemptee := scheduler.queue[0]