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>2017-05-26 17:12:31 -0400
commitdd4a184e7cbf78fd0880cc03456330c4980a4968 (patch)
tree334bd7e56fa0cda0794c01df4917182ba2856538
parente4861f6c978dd6e1901c0d4c3fd72ba1af9c281d (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.h7
2 files changed, 7 insertions, 2 deletions
diff --git a/kernel/sched/litmus.c b/kernel/sched/litmus.c
index 80e6928d9c55..6c587bdff401 100644
--- a/kernel/sched/litmus.c
+++ b/kernel/sched/litmus.c
@@ -359,7 +359,7 @@ const struct sched_class litmus_sched_class = {
359 * cpu-hotplug or cpu throttling. Allows Litmus to use up to 1.0 359 * cpu-hotplug or cpu throttling. Allows Litmus to use up to 1.0
360 * CPU capacity. 360 * CPU capacity.
361 */ 361 */
362 .next = &dl_sched_class, 362 .next = &stop_sched_class,
363 .enqueue_task = enqueue_task_litmus, 363 .enqueue_task = enqueue_task_litmus,
364 .dequeue_task = dequeue_task_litmus, 364 .dequeue_task = dequeue_task_litmus,
365 .yield_task = yield_task_litmus, 365 .yield_task = yield_task_litmus,
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index bce8ff9d43f1..585b193b2442 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1295,10 +1295,15 @@ static inline void set_curr_task(struct rq *rq, struct task_struct *curr)
1295 curr->sched_class->set_curr_task(rq); 1295 curr->sched_class->set_curr_task(rq);
1296} 1296}
1297 1297
1298#define sched_class_highest (&stop_sched_class) 1298/* Yes, this is conceptually wrong; this should be below the stop-machine class,
1299 * but existing plugins (that predate the stop-machine class) depend on the
1300 * assumption that LITMUS^RT plugins are the top scheduling class (FIXME).
1301 */
1302#define sched_class_highest (&litmus_sched_class)
1299#define for_each_class(class) \ 1303#define for_each_class(class) \
1300 for (class = sched_class_highest; class; class = class->next) 1304 for (class = sched_class_highest; class; class = class->next)
1301 1305
1306extern const struct sched_class litmus_sched_class;
1302extern const struct sched_class stop_sched_class; 1307extern const struct sched_class stop_sched_class;
1303extern const struct sched_class dl_sched_class; 1308extern const struct sched_class dl_sched_class;
1304extern const struct sched_class rt_sched_class; 1309extern const struct sched_class rt_sched_class;