From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759455AbdCVMiW (ORCPT ); Wed, 22 Mar 2017 08:38:22 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:50272 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752391AbdCVMiN (ORCPT ); Wed, 22 Mar 2017 08:38:13 -0400 Date: Wed, 22 Mar 2017 13:37:28 +0100 From: Peter Zijlstra To: Byungchul Park 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: <20170322123728.wjqy4sr2d2zsfqan@hirez.programming.kicks-ass.net> References: <1490082744-13461-1-git-send-email-byungchul.park@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1490082744-13461-1-git-send-email-byungchul.park@lge.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.