提交 5927ad78 编写于 作者: R Renaud Lienhart 提交者: Linus Torvalds

[PATCH] sched: use cached variable in sys_sched_yield()

In sys_sched_yield(), we cache current->array in the "array" variable, thus
there's no need to dereference "current" again later.
Signed-Off-By: NRenaud Lienhart <renaud.lienhart@free.fr>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 5969fe06
......@@ -3938,7 +3938,7 @@ asmlinkage long sys_sched_yield(void)
if (rt_task(current))
target = rq->active;
if (current->array->nr_active == 1) {
if (array->nr_active == 1) {
schedstat_inc(rq, yld_act_empty);
if (!rq->expired->nr_active)
schedstat_inc(rq, yld_both_empty);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册