Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932469AbdHYMWf (ORCPT ); Fri, 25 Aug 2017 08:22:35 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:34985 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754446AbdHYMWe (ORCPT ); Fri, 25 Aug 2017 08:22:34 -0400 Date: Fri, 25 Aug 2017 08:22:32 -0400 From: Josef Bacik To: Brendan Jackman Cc: Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org, Joel Fernandes , Andres Oportus , Dietmar Eggemann , Vincent Guittot , Josef Bacik , Morten Rasmussen Subject: Re: [PATCH v2 1/5] sched/fair: Move select_task_rq_fair slow-path into its own function Message-ID: <20170825122231.3kvec2kkmyxvb7cs@destiny> References: <20170825101632.28065-1-brendan.jackman@arm.com> <20170825101632.28065-2-brendan.jackman@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170825101632.28065-2-brendan.jackman@arm.com> User-Agent: NeoMutt/20170714 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1847 Lines: 47 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 > Signed-off-by: Brendan Jackman > Cc: Dietmar Eggemann > Cc: Vincent Guittot > Cc: Josef Bacik > Cc: Ingo Molnar > Cc: Morten Rasmussen > Cc: Peter Zijlstra > > 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 Thanks, Josef