On Fri, Aug 25, 2017 at 11:16:28AM +0100, Brendan Jackman wrote: > In preparation for changes that would otherwise require adding a new > level of indentation to the while(sd) loop, create a new function > find_idlest_cpu which contains this loop, and rename the existing > find_idlest_cpu to find_idlest_group_cpu. > > Code inside the while(sd) loop is unchanged. @new_cpu is added as a > variable in the new function, with the same initial value as the > @new_cpu in select_task_rq_fair. > > Suggested-by: Peter Zijlstra <pet...@infradead.org> > Signed-off-by: Brendan Jackman <brendan.jack...@arm.com> > Cc: Dietmar Eggemann <dietmar.eggem...@arm.com> > Cc: Vincent Guittot <vincent.guit...@linaro.org> > Cc: Josef Bacik <jo...@toxicpanda.com> > Cc: Ingo Molnar <mi...@redhat.com> > Cc: Morten Rasmussen <morten.rasmus...@arm.com> > Cc: Peter Zijlstra <pet...@infradead.org> > > squash! sched/fair: Move select_task_rq_fair slow-path into its own function > --- > kernel/sched/fair.c | 83 > +++++++++++++++++++++++++++++++---------------------- > 1 file changed, 48 insertions(+), 35 deletions(-) > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index c95880e216f6..f6e277c65235 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -5509,10 +5509,10 @@ find_idlest_group(struct sched_domain *sd, struct > task_struct *p, > } > > /* > - * find_idlest_cpu - find the idlest cpu among the cpus in group. > + * find_idlest_group_cpu - find the idlest cpu among the cpus in group. > */ > static int > -find_idlest_cpu(struct sched_group *group, struct task_struct *p, int > this_cpu) > +find_idlest_group_cpu(struct sched_group *group, struct task_struct *p, int > this_cpu)
I hate this name but can't think of something that isn't unreasonably long either. Reviewed-by: Josef Bacik <jba...@fb.com> Thanks, Josef