aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2015-08-09 07:18:51 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2015-08-09 07:20:27 -0400
commit2d9d30c425cbfea22b3ae57a39257db8f9466699 (patch)
tree51b4cbd82a98b319b04263dfcad82a7a1eb8ca8c
parentaa99ed78d651e782b8532dffac759d6f6baec60a (diff)
Make LITMUS^RT scheduling class the highest-priority scheduling class
Needs to be above stop_machine_class for legacy reasons; the main plugins were developed before stop_machine_class was introduced and assume that they are the highest-priority scheduling class.
-rw-r--r--kernel/sched/litmus.c2
-rw-r--r--kernel/sched/sched.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/kernel/sched/litmus.c b/kernel/sched/litmus.c
index 924358babde2..9d58690cf51a 100644
--- a/kernel/sched/litmus.c
+++ b/kernel/sched/litmus.c
@@ -324,7 +324,7 @@ const struct sched_class litmus_sched_class = {
324 * cpu-hotplug or cpu throttling. Allows Litmus to use up to 1.0 324 * cpu-hotplug or cpu throttling. Allows Litmus to use up to 1.0
325 * CPU capacity. 325 * CPU capacity.
326 */ 326 */
327 .next = &dl_sched_class, 327 .next = &stop_sched_class,
328 .enqueue_task = enqueue_task_litmus, 328 .enqueue_task = enqueue_task_litmus,
329 .dequeue_task = dequeue_task_litmus, 329 .dequeue_task = dequeue_task_litmus,
330 .yield_task = yield_task_litmus, 330 .yield_task = yield_task_litmus,
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 79807c2aa961..156389d32fbc 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1231,10 +1231,12 @@ static inline void put_prev_task(struct rq *rq, struct task_struct *prev)
1231 prev->sched_class->put_prev_task(rq, prev); 1231 prev->sched_class->put_prev_task(rq, prev);
1232} 1232}
1233 1233
1234#define sched_class_highest (&stop_sched_class) 1234#define sched_class_highest (&litmus_sched_class)
1235
1235#define for_each_class(class) \ 1236#define for_each_class(class) \
1236 for (class = sched_class_highest; class; class = class->next) 1237 for (class = sched_class_highest; class; class = class->next)
1237 1238
1239extern const struct sched_class litmus_sched_class;
1238extern const struct sched_class stop_sched_class; 1240extern const struct sched_class stop_sched_class;
1239extern const struct sched_class dl_sched_class; 1241extern const struct sched_class dl_sched_class;
1240extern const struct sched_class rt_sched_class; 1242extern const struct sched_class rt_sched_class;