Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755779AbdHYNkh (ORCPT ); Fri, 25 Aug 2017 09:40:37 -0400 Received: from mail-io0-f169.google.com ([209.85.223.169]:32788 "EHLO mail-io0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752874AbdHYNkg (ORCPT ); Fri, 25 Aug 2017 09:40:36 -0400 MIME-Version: 1.0 In-Reply-To: <20170825101632.28065-3-brendan.jackman@arm.com> References: <20170825101632.28065-1-brendan.jackman@arm.com> <20170825101632.28065-3-brendan.jackman@arm.com> From: Vincent Guittot Date: Fri, 25 Aug 2017 15:40:15 +0200 Message-ID: Subject: Re: [PATCH v2 2/5] sched/fair: Remove unnecessary comparison with -1 To: Brendan Jackman Cc: Ingo Molnar , Peter Zijlstra , linux-kernel , Joel Fernandes , Andres Oportus , Dietmar Eggemann , Josef Bacik , Morten Rasmussen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1356 Lines: 35 On 25 August 2017 at 12:16, Brendan Jackman wrote: > Since commit 83a0a96a5f26 ("sched/fair: Leverage the idle state info > when choosing the "idlest" cpu") find_idlest_grou_cpu (formerly > find_idlest_cpu) no longer returns -1. > > Signed-off-by: Brendan Jackman > Cc: Dietmar Eggemann > Cc: Vincent Guittot > Cc: Josef Bacik > Cc: Ingo Molnar > Cc: Morten Rasmussen > Cc: Peter Zijlstra Reviewed-by: Vincent Guittot > --- > kernel/sched/fair.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index f6e277c65235..4ccecbf825bf 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -5583,7 +5583,7 @@ static inline int find_idlest_cpu(struct sched_domain *sd, struct task_struct *p > } > > new_cpu = find_idlest_group_cpu(group, p, cpu); > - if (new_cpu == -1 || new_cpu == cpu) { > + if (new_cpu == cpu) { > /* Now try balancing at a lower domain level of cpu */ > sd = sd->child; > continue; > -- > 2.14.1 >