Commit 380c9077 authored by Kamalesh Babulal's avatar Kamalesh Babulal Committed by Ingo Molnar

sched/fair: Clean up update_sg_lb_stats() a bit

Add rq->nr_running to sgs->sum_nr_running directly instead of
assigning it through an intermediate variable nr_running.
Signed-off-by: default avatarKamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1384508212-25032-1-git-send-email-kamalesh@linux.vnet.ibm.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent c44f2a02
...@@ -5500,7 +5500,6 @@ static inline void update_sg_lb_stats(struct lb_env *env, ...@@ -5500,7 +5500,6 @@ static inline void update_sg_lb_stats(struct lb_env *env,
struct sched_group *group, int load_idx, struct sched_group *group, int load_idx,
int local_group, struct sg_lb_stats *sgs) int local_group, struct sg_lb_stats *sgs)
{ {
unsigned long nr_running;
unsigned long load; unsigned long load;
int i; int i;
...@@ -5509,8 +5508,6 @@ static inline void update_sg_lb_stats(struct lb_env *env, ...@@ -5509,8 +5508,6 @@ static inline void update_sg_lb_stats(struct lb_env *env,
for_each_cpu_and(i, sched_group_cpus(group), env->cpus) { for_each_cpu_and(i, sched_group_cpus(group), env->cpus) {
struct rq *rq = cpu_rq(i); struct rq *rq = cpu_rq(i);
nr_running = rq->nr_running;
/* Bias balancing toward cpus of our domain */ /* Bias balancing toward cpus of our domain */
if (local_group) if (local_group)
load = target_load(i, load_idx); load = target_load(i, load_idx);
...@@ -5518,7 +5515,7 @@ static inline void update_sg_lb_stats(struct lb_env *env, ...@@ -5518,7 +5515,7 @@ static inline void update_sg_lb_stats(struct lb_env *env,
load = source_load(i, load_idx); load = source_load(i, load_idx);
sgs->group_load += load; sgs->group_load += load;
sgs->sum_nr_running += nr_running; sgs->sum_nr_running += rq->nr_running;
#ifdef CONFIG_NUMA_BALANCING #ifdef CONFIG_NUMA_BALANCING
sgs->nr_numa_running += rq->nr_numa_running; sgs->nr_numa_running += rq->nr_numa_running;
sgs->nr_preferred_running += rq->nr_preferred_running; sgs->nr_preferred_running += rq->nr_preferred_running;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment