Re: [PATCH 05/13] sched/balancing: Rename load_balance() => sched_balance_rq()
From: Ingo Molnar
Date: Tue Mar 12 2024 - 06:28:31 EST
* Shrikanth Hegde <sshegde@xxxxxxxxxxxxx> wrote:
>
>
> On 3/8/24 4:48 PM, Ingo Molnar wrote:
> > Standardize scheduler load-balancing function names on the
> > sched_balance_() prefix.
> >
> > Also load_balance() has become somewhat of a misnomer: historically
> > it was the first and primary load-balancing function that was called,
> > but with the introduction of sched domains, it's become a lower
> > layer function that balances runqueues.
> >
> > Rename it to sched_balance_rq() accordingly.
>
> nit: Can this be sched_balance_rqs()? since load balancing happens
> between two runqeueus.
Yeah, but we really are primarily balancing *this* runqueue - because it
got potentially out of balance due to a newidle event, or we are checking
its balance in the periodic load-balancing tick. So it's really a shortcut
for 'balance this runqueue' - singular, although internally it will indeed
search for a source runqueue to move tasks from.
So it's a kind of a pull-balancing model, with a singular target (this_cpu).
> > Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
> > Cc: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
> > Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> > Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> > Cc: Shrikanth Hegde <sshegde@xxxxxxxxxxxxx>
> > Cc: Valentin Schneider <vschneid@xxxxxxxxxx>
> > Cc: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
> > ---
>
> Though one would have been familiar with names(for someone started recently),
> given the correct behaviour and historical context helps why the name changes are making sense.
>
> Reviewed-by: Shrikanth Hegde <sshegde@xxxxxxxxxxxxx>
Thanks! I've added your Reviewed-by tags to the series.
Ingo