提交 36dffab6 编写于 作者: V Vaidyanathan Srinivasan 提交者: Ingo Molnar

sched: nominate preferred wakeup cpu, fix

Andrew Morton reported:

> kernel/sched.c: In function 'schedule':
> kernel/sched.c:3679: warning: 'active_balance' may be used uninitialized in this function
>
> This warning is correct - the code is buggy.

In sched.c load_balance_newidle, there's real potential use of
uninitialised variable - fix it.
Signed-off-by: NVaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 b77b881f
......@@ -3670,7 +3670,7 @@ load_balance_newidle(int this_cpu, struct rq *this_rq, struct sched_domain *sd,
}
if (!ld_moved) {
int active_balance;
int active_balance = 0;
schedstat_inc(sd, lb_failed[CPU_NEWLY_IDLE]);
if (!sd_idle && sd->flags & SD_SHARE_CPUPOWER &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册