[PATCH v2 3/3] sched/balance: remove on_null_domain() in trigger_load_balance

From: Alex Shi
Date: Fri Sep 14 2012 - 01:48:12 EST


According to Suresh's inverstigation, the first on_null_domain in
trigger_load_balance is for avoiding unnecessary loadbalances(from
softirq) when a SMP kernel running on UP machine.
The second on_null_domain is not needed, since nohz_kick_needed()
will return 0 in this scenario.

So, remove the 2nd on_null_domain calling.

Signed-off-by: Alex Shi <alex.shi@xxxxxxxxx>
---
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 60d5505..1ae2c66 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4938,7 +4938,7 @@ void trigger_load_balance(struct rq *rq, int cpu)
likely(!on_null_domain(cpu)))
raise_softirq(SCHED_SOFTIRQ);
#ifdef CONFIG_NO_HZ
- if (nohz_kick_needed(rq, cpu) && likely(!on_null_domain(cpu)))
+ if (nohz_kick_needed(rq, cpu))
nohz_balancer_kick(cpu);
#endif
}
--
1.7.12

--
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/