optimize activate_task()
PATCH 1/1 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 <[email protected]>
kernel/sched.c renamed from kernel/sched.c.orig +2 -1
@@ -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
Quoted 8 lines · Chen, Kenneth W
recalc_task_prio()is called fromactivate_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 optimizerecalc_task_prio()away for rt processes.Signed-off-by Ken Chen <[email protected]>
Acked-by Ingo Molnar <[email protected]>
Ingo