Skip to content

Commit

Permalink
sched/nohz: Merge CONFIG_NO_HZ_COMMON blocks
Browse files Browse the repository at this point in the history
Now that we have two back-to-back NO_HZ_COMMON blocks, merge them.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Mar 9, 2018
1 parent af3fe03 commit dd70724
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -9487,11 +9487,7 @@ void nohz_balance_enter_idle(int cpu)
*/
WRITE_ONCE(nohz.has_blocked, 1);
}
#else
static inline void nohz_balancer_kick(struct rq *rq) { }
#endif

#ifdef CONFIG_NO_HZ_COMMON
/*
* In CONFIG_NO_HZ_COMMON case, the idle balance kickee will do the
* rebalancing for all the CPUs for whom scheduler ticks are stopped.
Expand Down Expand Up @@ -9598,12 +9594,14 @@ static bool nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle)

return true;
}
#else
#else /* !CONFIG_NO_HZ_COMMON */
static inline void nohz_balancer_kick(struct rq *rq) { }

static bool nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle)
{
return false;
}
#endif
#endif /* CONFIG_NO_HZ_COMMON */

/*
* run_rebalance_domains is triggered when needed from the scheduler tick.
Expand Down

0 comments on commit dd70724

Please sign in to comment.