diff options
author | Chen, Kenneth W <kenneth.w.chen@intel.com> | 2005-11-09 18:45:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 19:07:44 -0500 |
commit | a47ab9371e664952b1104a70ec8e9b74db3f7a5f (patch) | |
tree | 4efadd76dcd5c1712ce2e337ef2e8a87acdc8518 | |
parent | 6730c3c14421b7c924d06e31bb66e0adad225547 (diff) |
[PATCH] optimize activate_task()
recalc_task_prio() is called from activate_task() to calculate dynamic
priority and interactive credit for the activating task. For real-time
scheduling process, all that dynamic calculation is thrown away at the end
because rt priority is fixed. Patch to optimize recalc_task_prio() away
for rt processes.
Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Nick Piggin <piggin@cyberone.com.au>
Cc: Con Kolivas <kernel@kolivas.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | kernel/sched.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index ac3f5cc3bb51..b6506671b2be 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -815,7 +815,8 @@ static void activate_task(task_t *p, runqueue_t *rq, int local) | |||
815 | } | 815 | } |
816 | #endif | 816 | #endif |
817 | 817 | ||
818 | p->prio = recalc_task_prio(p, now); | 818 | if (!rt_task(p)) |
819 | p->prio = recalc_task_prio(p, now); | ||
819 | 820 | ||
820 | /* | 821 | /* |
821 | * This checks to make sure it's not an uninterruptible task | 822 | * This checks to make sure it's not an uninterruptible task |