diff options
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 9ad41979c0b2..1701eaebb79c 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -487,6 +487,7 @@ struct rt_rq { | |||
487 | 487 | ||
488 | /* Litmus related fields in a runqueue */ | 488 | /* Litmus related fields in a runqueue */ |
489 | struct litmus_rq { | 489 | struct litmus_rq { |
490 | unsigned long nr_running; | ||
490 | struct task_struct *prev; | 491 | struct task_struct *prev; |
491 | }; | 492 | }; |
492 | 493 | ||
@@ -5420,13 +5421,15 @@ pick_next_task(struct rq *rq) | |||
5420 | /* | 5421 | /* |
5421 | * Optimization: we know that if all tasks are in | 5422 | * Optimization: we know that if all tasks are in |
5422 | * the fair class we can call that function directly: | 5423 | * the fair class we can call that function directly: |
5423 | */ | 5424 | |
5424 | /* | 5425 | * NOT IN LITMUS^RT! |
5425 | * LITMUS_TODO: can we move processes out of fair class? | 5426 | |
5426 | * i.e., create a litmus_rq | 5427 | * This breaks many assumptions in the plugins. |
5427 | */ | 5428 | * Do not uncomment without thinking long and hard |
5428 | /* Don't do this for LITMUS | 5429 | * about how this affects global plugins such as GSN-EDF. |
5429 | if (likely(rq->nr_running == rq->cfs.nr_running)) { | 5430 | |
5431 | if (rq->nr_running == rq->cfs.nr_running) { | ||
5432 | TRACE("taking shortcut in pick_next_task()\n"); | ||
5430 | p = fair_sched_class.pick_next_task(rq); | 5433 | p = fair_sched_class.pick_next_task(rq); |
5431 | if (likely(p)) | 5434 | if (likely(p)) |
5432 | return p; | 5435 | return p; |