From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750933AbdHRFfA (ORCPT ); Fri, 18 Aug 2017 01:35:00 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:49882 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750709AbdHRFe7 (ORCPT ); Fri, 18 Aug 2017 01:34:59 -0400 X-Original-SENDERIP: 156.147.1.127 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Fri, 18 Aug 2017 14:34:55 +0900 From: Byungchul Park To: "Joel Fernandes (Google)" Cc: Peter Zijlstra , mingo@kernel.org, Linux Kernel Mailing List , juri.lelli@gmail.com, rostedt@goodmis.org, kernel-team@lge.com Subject: Re: [PATCH v6 0/2] Make find_later_rq() choose a closer cpu in topology Message-ID: <20170818053455.GA20323@X58A-UD3R> References: <1502077834-11137-1-git-send-email-byungchul.park@lge.com> <20170818012555.GY20323@X58A-UD3R> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 17, 2017 at 09:51:34PM -0700, Joel Fernandes (Google) wrote: > On Thu, Aug 17, 2017 at 6:25 PM, Byungchul Park wrote: > > On Mon, Aug 07, 2017 at 12:50:32PM +0900, Byungchul Park wrote: > >> When cpudl_find() returns any among free_cpus, the cpu might not be > >> closer than others, considering sched domain. For example: > >> > >> this_cpu: 15 > >> free_cpus: 0, 1,..., 14 (== later_mask) > >> best_cpu: 0 > >> > >> topology: > >> > >> 0 --+ > >> +--+ > >> 1 --+ | > >> +-- ... --+ > >> 2 --+ | | > >> +--+ | > >> 3 --+ | > >> > >> ... ... > >> > >> 12 --+ | > >> +--+ | > >> 13 --+ | | > >> +-- ... -+ > >> 14 --+ | > >> +--+ > >> 15 --+ > >> > >> In this case, it would be best to select 14 since it's a free cpu and > >> closest to 15(this_cpu). However, currently the code select 0(best_cpu) > >> even though that's just any among free_cpus. Fix it. > > > > Could you let me know your opinions about this? > > Patch looks good to me, I would also add a comment ontop of > fallback_cpu (I think Steve mentioned similar thing at [1]) > > /* > * fallback is the closest CPU in the closest SD incase > * all domains are PREFER_SIBLING > */ > if (fallback_cpu == -1) > fallback_cpu = best_cpu; > > And clarify this in the commit message. Right. I will add it. Thank you very much, Byungchul