If we trigger for a nohz kick, it doesn't matter about triggering for an idle pull since the idle_pull flag will remain set when we execute the softirq. It's simpler to layout the code this way.
Signed-off-by: Chris Redpath chris.redpath@arm.com --- kernel/sched/core.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 89e49e1..2a74474 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1434,22 +1434,16 @@ void scheduler_ipi(void) /* * Check if someone kicked us for doing the nohz idle load balance. */ -#ifdef CONFIG_SCHED_HMP - { - bool nohz = got_nohz_idle_kick(); - if (unlikely(this_rq()->wake_for_idle_pull) || - unlikely(nohz)) { - if (unlikely(nohz)) - this_rq()->idle_balance = 1; - raise_softirq_irqoff(SCHED_SOFTIRQ); - } - } -#else if (unlikely(got_nohz_idle_kick())) { this_rq()->idle_balance = 1; raise_softirq_irqoff(SCHED_SOFTIRQ); } +#ifdef CONFIG_SCHED_HMP + else if (unlikely(this_rq()->wake_for_idle_pull)) { + raise_softirq_irqoff(SCHED_SOFTIRQ); + } #endif + irq_exit(); }