From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5BCEC3A5A7 for ; Tue, 6 Dec 2022 17:23:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234508AbiLFRXJ (ORCPT ); Tue, 6 Dec 2022 12:23:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234965AbiLFRXD (ORCPT ); Tue, 6 Dec 2022 12:23:03 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 673C3391E8 for ; Tue, 6 Dec 2022 09:23:01 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DA3CB23A; Tue, 6 Dec 2022 09:23:07 -0800 (PST) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E20953F73B; Tue, 6 Dec 2022 09:22:57 -0800 (PST) Message-ID: <76e23104-a8c0-a5fc-b8c6-27de79df2372@arm.com> Date: Tue, 6 Dec 2022 18:22:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v2 1/7] sched/fair: Generalize asym_packing logic for SMT local sched group Content-Language: en-US To: Ricardo Neri , "Peter Zijlstra (Intel)" , Juri Lelli , Vincent Guittot Cc: Ricardo Neri , "Ravi V. Shankar" , Ben Segall , Daniel Bristot de Oliveira , Len Brown , Mel Gorman , "Rafael J. Wysocki" , Srinivas Pandruvada , Steven Rostedt , Tim Chen , Valentin Schneider , x86@kernel.org, linux-kernel@vger.kernel.org, "Tim C . Chen" References: <20221122203532.15013-1-ricardo.neri-calderon@linux.intel.com> <20221122203532.15013-2-ricardo.neri-calderon@linux.intel.com> From: Dietmar Eggemann In-Reply-To: <20221122203532.15013-2-ricardo.neri-calderon@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/11/2022 21:35, Ricardo Neri wrote: > When balancing load between two physical cores, an idle destination CPU can > help another core only if all of its SMT siblings are also idle. Otherwise, > there is not increase in throughput. It does not matter whether the other > core is composed of SMT siblings. > > Simply check if there are any tasks running on the local group and the > other core has exactly one busy CPU before proceeding. Let > find_busiest_group() handle the case of more than one busy CPU. This is > true for SMT2, SMT4, SMT8, etc. [...] > Changes since v1: > * Reworded commit message and inline comments for clarity. > * Stated that this changeset does not impact STM4 or SMT8. > --- > kernel/sched/fair.c | 29 +++++++++-------------------- > 1 file changed, 9 insertions(+), 20 deletions(-) > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index e4a0b8bd941c..18c672ff39ef 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -8900,12 +8900,10 @@ static bool asym_smt_can_pull_tasks(int dst_cpu, struct sd_lb_stats *sds, > struct sched_group *sg) I'm not sure why you change asym_smt_can_pull_tasks() together with removing SD_ASYM_PACKING from SMT level (patch 5/7)? update_sg_lb_stats() ... && env->sd->flags & SD_ASYM_PACKING && .. && sched_asym() ^^^^^^^^^^^^ sched_asym() if ((sds->local->flags & SD_SHARE_CPUCAPACITY) || (group->flags & SD_SHARE_CPUCAPACITY)) return asym_smt_can_pull_tasks() ^^^^^^^^^^^^^^^^^^^^^^^^^ So x86 won't have a sched domain with SD_SHARE_CPUCAPACITY and SD_ASYM_PACKING anymore. So sched_asym() would call sched_asym_prefer() directly on MC. What do I miss here? [...]