diff options
author | Gregory Haskins <ghaskins@novell.com> | 2008-01-25 15:08:09 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-25 15:08:09 -0500 |
commit | e7693a362ec84bb5b6fd441d8a8b4b9d568a7a0c (patch) | |
tree | 078940540641a59aaf199695bfc6de3f062a987b /kernel/sched_rt.c | |
parent | 697f0a487f294e634a342764472b79375bb3158a (diff) |
sched: de-SCHED_OTHER-ize the RT path
The current wake-up code path tries to determine if it can optimize the
wake-up to "this_cpu" by computing load calculations. The problem is that
these calculations are only relevant to SCHED_OTHER tasks where load is king.
For RT tasks, priority is king. So the load calculation is completely wasted
bandwidth.
Therefore, we create a new sched_class interface to help with
pre-wakeup routing decisions and move the load calculation as a function
of CFS task's class.
Signed-off-by: Gregory Haskins <ghaskins@novell.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r-- | kernel/sched_rt.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index b788e35ffd3f..5de1aebdbd1b 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -150,6 +150,13 @@ yield_task_rt(struct rq *rq) | |||
150 | requeue_task_rt(rq, rq->curr); | 150 | requeue_task_rt(rq, rq->curr); |
151 | } | 151 | } |
152 | 152 | ||
153 | #ifdef CONFIG_SMP | ||
154 | static int select_task_rq_rt(struct task_struct *p, int sync) | ||
155 | { | ||
156 | return task_cpu(p); | ||
157 | } | ||
158 | #endif /* CONFIG_SMP */ | ||
159 | |||
153 | /* | 160 | /* |
154 | * Preempt the current task with a newly woken task if needed: | 161 | * Preempt the current task with a newly woken task if needed: |
155 | */ | 162 | */ |
@@ -667,6 +674,9 @@ const struct sched_class rt_sched_class = { | |||
667 | .enqueue_task = enqueue_task_rt, | 674 | .enqueue_task = enqueue_task_rt, |
668 | .dequeue_task = dequeue_task_rt, | 675 | .dequeue_task = dequeue_task_rt, |
669 | .yield_task = yield_task_rt, | 676 | .yield_task = yield_task_rt, |
677 | #ifdef CONFIG_SMP | ||
678 | .select_task_rq = select_task_rq_rt, | ||
679 | #endif /* CONFIG_SMP */ | ||
670 | 680 | ||
671 | .check_preempt_curr = check_preempt_curr_rt, | 681 | .check_preempt_curr = check_preempt_curr_rt, |
672 | 682 | ||