aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_rt.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r--kernel/sched_rt.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index af1177858be..b827550a0d0 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -3,6 +3,8 @@
3 * policies) 3 * policies)
4 */ 4 */
5 5
6#include <litmus/litmus.h>
7
6#ifdef CONFIG_RT_GROUP_SCHED 8#ifdef CONFIG_RT_GROUP_SCHED
7 9
8#define rt_entity_is_task(rt_se) (!(rt_se)->my_q) 10#define rt_entity_is_task(rt_se) (!(rt_se)->my_q)
@@ -240,8 +242,11 @@ static void sched_rt_rq_enqueue(struct rt_rq *rt_rq)
240 if (rt_rq->rt_nr_running) { 242 if (rt_rq->rt_nr_running) {
241 if (rt_se && !on_rt_rq(rt_se)) 243 if (rt_se && !on_rt_rq(rt_se))
242 enqueue_rt_entity(rt_se, false); 244 enqueue_rt_entity(rt_se, false);
243 if (rt_rq->highest_prio.curr < curr->prio) 245 if (rt_rq->highest_prio.curr < curr->prio &&
246 /* Don't subject LITMUS tasks to remote reschedules */
247 !is_realtime(curr)) {
244 resched_task(curr); 248 resched_task(curr);
249 }
245 } 250 }
246} 251}
247 252
@@ -334,8 +339,10 @@ static inline struct rt_rq *group_rt_rq(struct sched_rt_entity *rt_se)
334 339
335static inline void sched_rt_rq_enqueue(struct rt_rq *rt_rq) 340static inline void sched_rt_rq_enqueue(struct rt_rq *rt_rq)
336{ 341{
337 if (rt_rq->rt_nr_running) 342 struct task_struct *curr = rq_of_rt_rq(rt_rq)->curr;
338 resched_task(rq_of_rt_rq(rt_rq)->curr); 343
344 if (rt_rq->rt_nr_running && !is_realtime(curr))
345 resched_task(curr);
339} 346}
340 347
341static inline void sched_rt_rq_dequeue(struct rt_rq *rt_rq) 348static inline void sched_rt_rq_dequeue(struct rt_rq *rt_rq)
@@ -1090,7 +1097,7 @@ static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p)
1090 */ 1097 */
1091static void check_preempt_curr_rt(struct rq *rq, struct task_struct *p, int flags) 1098static void check_preempt_curr_rt(struct rq *rq, struct task_struct *p, int flags)
1092{ 1099{
1093 if (p->prio < rq->curr->prio) { 1100 if (p->prio < rq->curr->prio || p->policy == SCHED_LITMUS) {
1094 resched_task(rq->curr); 1101 resched_task(rq->curr);
1095 return; 1102 return;
1096 } 1103 }