aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2013-07-01 17:56:31 -0400
committerNamhoon Kim <namhoonk@cs.unc.edu>2014-10-21 10:07:40 -0400
commite801a3104619e8dbee8e1fed05402f160d8f790d (patch)
tree716ed11e88a77f1691526d9b44a4f19214cd89d0
parent0aea465f37878c328da2361607b4670725be1139 (diff)
Hook into rt scheduling class to protect LITMUS^RT tasks
The rt scheduling class thinks it's the highest-priority scheduling class around. It is not in LITMUS^RT. Don't go preempting remote cores that run SCHED_LITMUS tasks.
-rw-r--r--kernel/sched/rt.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 15334e6de832..dbe21ae888f8 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -7,6 +7,8 @@
7 7
8#include <linux/slab.h> 8#include <linux/slab.h>
9 9
10#include <litmus/litmus.h>
11
10int sched_rr_timeslice = RR_TIMESLICE; 12int sched_rr_timeslice = RR_TIMESLICE;
11 13
12static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun); 14static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun);
@@ -436,7 +438,9 @@ static void sched_rt_rq_enqueue(struct rt_rq *rt_rq)
436 if (rt_rq->rt_nr_running) { 438 if (rt_rq->rt_nr_running) {
437 if (rt_se && !on_rt_rq(rt_se)) 439 if (rt_se && !on_rt_rq(rt_se))
438 enqueue_rt_entity(rt_se, false); 440 enqueue_rt_entity(rt_se, false);
439 if (rt_rq->highest_prio.curr < curr->prio) 441 if (rt_rq->highest_prio.curr < curr->prio
442 /* Don't subject LITMUS^RT tasks to remote reschedules. */
443 && !is_realtime(curr))
440 resched_task(curr); 444 resched_task(curr);
441 } 445 }
442} 446}
@@ -530,7 +534,8 @@ static inline struct rt_rq *group_rt_rq(struct sched_rt_entity *rt_se)
530 534
531static inline void sched_rt_rq_enqueue(struct rt_rq *rt_rq) 535static inline void sched_rt_rq_enqueue(struct rt_rq *rt_rq)
532{ 536{
533 if (rt_rq->rt_nr_running) 537 if (rt_rq->rt_nr_running
538 && !is_realtime(rq_of_rt_rq(rt_rq)->curr))
534 resched_task(rq_of_rt_rq(rt_rq)->curr); 539 resched_task(rq_of_rt_rq(rt_rq)->curr);
535} 540}
536 541