提交 a47ab937 编写于 作者: C Chen, Kenneth W 提交者: Linus Torvalds

[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: NKen Chen <kenneth.w.chen@intel.com>
Acked-by: NIngo Molnar <mingo@elte.hu>
Cc: Nick Piggin <piggin@cyberone.com.au>
Cc: Con Kolivas <kernel@kolivas.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 6730c3c1
......@@ -815,7 +815,8 @@ static void activate_task(task_t *p, runqueue_t *rq, int local)
}
#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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册