[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130815111959.GQ24092@twins.programming.kicks-ass.net>
Date: Thu, 15 Aug 2013 13:19:59 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Joonsoo Kim <iamjoonsoo.kim@....com>
Cc: Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
Mike Galbraith <efault@....de>, Paul Turner <pjt@...gle.com>,
Alex Shi <alex.shi@...el.com>,
Preeti U Murthy <preeti@...ux.vnet.ibm.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Morten Rasmussen <morten.rasmussen@....com>,
Namhyung Kim <namhyung@...nel.org>,
Joonsoo Kim <js1304@...il.com>
Subject: Re: [PATCH v3 2/3] sched: factor out code to should_we_balance()
On Tue, Aug 06, 2013 at 05:36:42PM +0900, Joonsoo Kim wrote:
Another one of these patches I should stare in more detail at..
> static int load_balance(int this_cpu, struct rq *this_rq,
> struct sched_domain *sd, enum cpu_idle_type idle,
> - int *balance)
> + int *should_balance)
> {
> int ld_moved, cur_ld_moved, active_balance = 0;
> struct sched_group *group;
> @@ -5073,12 +5070,14 @@ static int load_balance(int this_cpu, struct rq *this_rq,
>
> schedstat_inc(sd, lb_count[idle]);
>
> -redo:
> - group = find_busiest_group(&env, balance);
> -
> - if (*balance == 0)
> + if (!should_we_balance(&env)) {
> + *should_balance = 0;
> goto out_balanced;
> + } else
> + *should_balance = 1;
--- 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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists