Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751901AbdHaNyp (ORCPT ); Thu, 31 Aug 2017 09:54:45 -0400 Received: from mail-yw0-f194.google.com ([209.85.161.194]:38187 "EHLO mail-yw0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751607AbdHaNym (ORCPT ); Thu, 31 Aug 2017 09:54:42 -0400 X-Google-Smtp-Source: ADKCNb48bHcRIDq+SLJgHphX5+4kyMUJEQw5ib0Jo0zZ/gD4hPi8CQeuFUVspYDYRztHR4eqnlzUWQ== Date: Thu, 31 Aug 2017 09:54:40 -0400 From: Josef Bacik To: Brendan Jackman Cc: Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org, Dietmar Eggemann , Vincent Guittot , Josef Bacik , Morten Rasmussen Subject: Re: [PATCH v3 4/5] sched/fair: Fix use of find_idlest_group when no groups are allowed Message-ID: <20170831135440.t5mhrhuofudxlgy4@destiny> References: <20170831115802.26365-1-brendan.jackman@arm.com> <20170831115802.26365-5-brendan.jackman@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170831115802.26365-5-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: 593 Lines: 17 On Thu, Aug 31, 2017 at 12:58:01PM +0100, Brendan Jackman wrote: > When p is allowed on none of the CPUs in the sched_domain, we > currently return NULL from find_idlest_group, and pointlessly > continue the search on lower sched_domain levels (where p is also not > allowed) before returning prev_cpu regardless (as we have not updated > new_cpu). > > Add an explicit check for this case, and a comment to > find_idlest_group. Now when find_idlest_group returns NULL, it always > means that the local group is allowed and idlest. > Reviewed-by: Josef Bacik Thanks, Josef