Re: [PATCH v3 2/3] sched: factor out code to should_we_balance()

From: JoonSoo Kim
Date: Fri Aug 16 2013 - 12:52:48 EST


Hello, Peter.

2013/8/15 Peter Zijlstra <peterz@xxxxxxxxxxxxx>:
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -5120,11 +5120,8 @@ static int load_balance(int this_cpu, st
>
> schedstat_inc(sd, lb_count[idle]);
>
> - if (!should_we_balance(&env)) {
> - *should_balance = 0;
> + if (!(*should_balance = should_we_balance(&env)))
> goto out_balanced;
> - } else
> - *should_balance = 1;
>
> redo:
> group = find_busiest_group(&env);
>

Looks better!

Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/