diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-08-09 07:18:52 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-08-09 07:20:28 -0400 |
commit | cdb8efa4e1ffe6207722a545ec71242f49e7111f (patch) | |
tree | efcb571f4406b73fe33d8e5b7570cdc79c8586ef | |
parent | 7a56274fcd7fdbfd928e9ec8c1772cae645a0749 (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.
-rw-r--r-- | kernel/sched/core.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 42b4e32ec494..426f4e776188 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -2697,21 +2697,29 @@ pick_next_task(struct rq *rq, struct task_struct *prev) | |||
2697 | /* | 2697 | /* |
2698 | * Optimization: we know that if all tasks are in | 2698 | * Optimization: we know that if all tasks are in |
2699 | * the fair class we can call that function directly: | 2699 | * the fair class we can call that function directly: |
2700 | */ | 2700 | |
2701 | * NOT IN LITMUS^RT! | ||
2702 | |||
2703 | * This breaks many assumptions in the plugins. | ||
2704 | * Do not uncomment without thinking long and hard | ||
2705 | * about how this affects global plugins such as GSN-EDF. | ||
2706 | |||
2701 | if (likely(prev->sched_class == class && | 2707 | if (likely(prev->sched_class == class && |
2702 | rq->nr_running == rq->cfs.h_nr_running)) { | 2708 | rq->nr_running == rq->cfs.h_nr_running)) { |
2703 | p = fair_sched_class.pick_next_task(rq, prev); | 2709 | p = fair_sched_class.pick_next_task(rq, prev); |
2704 | if (unlikely(p == RETRY_TASK)) | 2710 | if (unlikely(p == RETRY_TASK)) |
2705 | goto again; | 2711 | goto again; |
2706 | 2712 | ||
2707 | /* assumes fair_sched_class->next == idle_sched_class */ | 2713 | // assumes fair_sched_class->next == idle_sched_class |
2708 | if (unlikely(!p)) | 2714 | if (unlikely(!p)) |
2709 | p = idle_sched_class.pick_next_task(rq, prev); | 2715 | p = idle_sched_class.pick_next_task(rq, prev); |
2710 | 2716 | ||
2711 | return p; | 2717 | return p; |
2712 | } | 2718 | |
2719 | */ | ||
2713 | 2720 | ||
2714 | again: | 2721 | again: |
2722 | |||
2715 | for_each_class(class) { | 2723 | for_each_class(class) { |
2716 | p = class->pick_next_task(rq, prev); | 2724 | p = class->pick_next_task(rq, prev); |
2717 | if (p) { | 2725 | if (p) { |