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....@intel.com>
---
 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to