Skip to content

Commit dd70724

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
sched/nohz: Merge CONFIG_NO_HZ_COMMON blocks
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>
1 parent af3fe03 commit dd70724

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

kernel/sched/fair.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9487,11 +9487,7 @@ void nohz_balance_enter_idle(int cpu)
94879487
*/
94889488
WRITE_ONCE(nohz.has_blocked, 1);
94899489
}
9490-
#else
9491-
static inline void nohz_balancer_kick(struct rq *rq) { }
9492-
#endif
94939490

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

95999595
return true;
96009596
}
9601-
#else
9597+
#else /* !CONFIG_NO_HZ_COMMON */
9598+
static inline void nohz_balancer_kick(struct rq *rq) { }
9599+
96029600
static bool nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle)
96039601
{
96049602
return false;
96059603
}
9606-
#endif
9604+
#endif /* CONFIG_NO_HZ_COMMON */
96079605

96089606
/*
96099607
* run_rebalance_domains is triggered when needed from the scheduler tick.

0 commit comments

Comments
 (0)