aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2015-08-09 07:18:52 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2017-05-26 17:12:33 -0400
commit2b2bfacf05bfd64a0f315894ec87367590158e94 (patch)
treeabf3a9fc38fb7f184fc3641db59f8ac855021f3e /kernel
parent3e53de728b191fbd0de09cc2283878e76afa7917 (diff)
Disable cut-to-CFS optimization in Linux scheduler
Global plugins require that the plugin be called even if there currently is no real-time task executing on the local core.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/core.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index d1a8feda6918..6bd6bfd2fcb9 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3307,21 +3307,29 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct pin_cookie cookie
3307 /* 3307 /*
3308 * Optimization: we know that if all tasks are in 3308 * Optimization: we know that if all tasks are in
3309 * the fair class we can call that function directly: 3309 * the fair class we can call that function directly:
3310 */ 3310
3311 * NOT IN LITMUS^RT!
3312
3313 * This breaks many assumptions in the plugins.
3314 * Do not uncomment without thinking long and hard
3315 * about how this affects global plugins such as GSN-EDF.
3316
3311 if (likely(prev->sched_class == class && 3317 if (likely(prev->sched_class == class &&
3312 rq->nr_running == rq->cfs.h_nr_running)) { 3318 rq->nr_running == rq->cfs.h_nr_running)) {
3313 p = fair_sched_class.pick_next_task(rq, prev, cookie); 3319 p = fair_sched_class.pick_next_task(rq, prev, cookie);
3314 if (unlikely(p == RETRY_TASK)) 3320 if (unlikely(p == RETRY_TASK))
3315 goto again; 3321 goto again;
3316 3322
3317 /* assumes fair_sched_class->next == idle_sched_class */ 3323 // assumes fair_sched_class->next == idle_sched_class
3318 if (unlikely(!p)) 3324 if (unlikely(!p))
3319 p = idle_sched_class.pick_next_task(rq, prev, cookie); 3325 p = idle_sched_class.pick_next_task(rq, prev, cookie);
3320 3326
3321 return p; 3327 return p;
3322 } 3328
3329 */
3323 3330
3324again: 3331again:
3332
3325 for_each_class(class) { 3333 for_each_class(class) {
3326 p = class->pick_next_task(rq, prev, cookie); 3334 p = class->pick_next_task(rq, prev, cookie);
3327 if (p) { 3335 if (p) {