Commit 3dc6f6c8 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

sched/balancing: Update run_rebalance_domains() comments



The first sentence of the comment explaining run_rebalance_domains()
is historic and not true anymore:

    * run_rebalance_domains is triggered when needed from the scheduler tick.

... contradicted/modified by the second sentence:

    * Also triggered for NOHZ idle balancing (with NOHZ_BALANCE_KICK set).

Avoid that kind of confusion straight away and explain from what
places sched_balance_softirq() is triggered.

Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Reviewed-by: default avatarVincent Guittot <vincent.guittot@linaro.org>
Acked-by: default avatarValentin Schneider <vschneid@redhat.com>
Link: https://lore.kernel.org/r/20240308105901.1096078-9-mingo@kernel.org
parent 3a5fe930
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -12409,9 +12409,12 @@ static int newidle_balance(struct rq *this_rq, struct rq_flags *rf)
}

/*
 * This softirq may be triggered from the scheduler tick, or by
 * any of the flags in NOHZ_KICK_MASK: NOHZ_BALANCE_KICK,
 * NOHZ_STATS_KICK or NOHZ_NEXT_KICK.
 * This softirq handler is triggered via SCHED_SOFTIRQ from two places:
 *
 * - directly from the local scheduler_tick() for periodic load balancing
 *
 * - indirectly from a remote scheduler_tick() for NOHZ idle balancing
 *   through the SMP cross-call nohz_csd_func()
 */
static __latent_entropy void run_rebalance_domains(struct softirq_action *h)
{