From fa43e0fe6e05b244695200ba83fccec2b84e142b Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 21 May 2013 20:14:39 -0700 Subject: [PATCH] scheduler: enforce job limits in score-based scheduling --- sched/sched_score.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sched/sched_score.cpp b/sched/sched_score.cpp index e156193cf3..6f49523de5 100644 --- a/sched/sched_score.cpp +++ b/sched/sched_score.cpp @@ -179,7 +179,12 @@ void send_work_score_type(int rt) { bool sema_locked = false; for (unsigned int i=0; ineed_proc_type(rt)) break; + if (!work_needed(false)) { + break; + } + if (!g_wreq->need_proc_type(rt)) { + break; + } JOB& job = jobs[i]; if (!sema_locked) { lock_sema();