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 <[email protected]>
--- ./kernel/sched.c.orig 2005-10-26 10:39:40.594015398 -0700
+++ ./kernel/sched.c 2005-10-26 18:43:12.187410006 -0700
@@ -833,7 +833,8 @@ static void activate_task(task_t *p, run
}
#endif
- p->prio = recalc_task_prio(p, now);
+ if (!rt_task(p))
+ p->prio = recalc_task_prio(p, now);
/*
* This checks to make sure it's not an uninterruptible task
* Chen, Kenneth W <[email protected]> wrote:
> 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 <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Ingo