From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754456AbdCVXW1 (ORCPT ); Wed, 22 Mar 2017 19:22:27 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:40772 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751844AbdCVXWX (ORCPT ); Wed, 22 Mar 2017 19:22:23 -0400 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Thu, 23 Mar 2017 08:21:46 +0900 From: Byungchul Park To: Peter Zijlstra Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, juri.lelli@gmail.com, rostedt@goodmis.org, kernel-team@lge.com Subject: Re: [PATCH v2] sched/deadline: Make find_later_rq() choose a closer cpu in topology Message-ID: <20170322232145.GO11100@X58A-UD3R> References: <1490082744-13461-1-git-send-email-byungchul.park@lge.com> <20170322123728.wjqy4sr2d2zsfqan@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170322123728.wjqy4sr2d2zsfqan@hirez.programming.kicks-ass.net> 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 Wed, Mar 22, 2017 at 01:37:28PM +0100, Peter Zijlstra wrote: > On Tue, Mar 21, 2017 at 04:52:24PM +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. > > This would result in picking the HT sibling, if available. Which is > typically the worst possible pick. > > If you add support for SD_PREFER_SIBLING, which denotes a preference for > any other sibling domain above this one, this might work. Sure. I will add that support as well. Thank you.