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 AD936C4332F for ; Thu, 8 Dec 2022 16:03:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229942AbiLHQDK (ORCPT ); Thu, 8 Dec 2022 11:03:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229658AbiLHQDI (ORCPT ); Thu, 8 Dec 2022 11:03:08 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CE2459B2A5 for ; Thu, 8 Dec 2022 08:03:06 -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 C578323A; Thu, 8 Dec 2022 08:03:12 -0800 (PST) Received: from localhost (ionvoi01-desktop.cambridge.arm.com [10.1.196.65]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A48463F73D; Thu, 8 Dec 2022 08:03:05 -0800 (PST) Date: Thu, 8 Dec 2022 16:03:04 +0000 From: Ionela Voinescu To: Ricardo Neri Cc: "Peter Zijlstra (Intel)" , Juri Lelli , Vincent Guittot , Ricardo Neri , "Ravi V. Shankar" , Ben Segall , Daniel Bristot de Oliveira , Dietmar Eggemann , 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" Subject: Re: [PATCH v2 5/7] x86/sched: Remove SD_ASYM_PACKING from the "SMT" domain Message-ID: References: <20221122203532.15013-1-ricardo.neri-calderon@linux.intel.com> <20221122203532.15013-6-ricardo.neri-calderon@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221122203532.15013-6-ricardo.neri-calderon@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ricardo, On Tuesday 22 Nov 2022 at 12:35:30 (-0800), Ricardo Neri wrote: > There is no difference between any of the SMT siblings of a physical core. > asym_packing load balancing is not needed among siblings. > > When balancing load among physical cores, the scheduler now considers the > state of the siblings when checking the priority of a CPU. > > Cc: Ben Segall > Cc: Daniel Bristot de Oliveira > Cc: Dietmar Eggemann > Cc: Len Brown > Cc: Mel Gorman > Cc: Rafael J. Wysocki > Cc: Srinivas Pandruvada > Cc: Steven Rostedt > Cc: Tim C. Chen > Cc: Valentin Schneider > Cc: x86@kernel.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Ricardo Neri > --- > Changes since v1: > * Introduced this patch. > --- > arch/x86/kernel/smpboot.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c > index 3f3ea0287f69..c3de98224cb4 100644 > --- a/arch/x86/kernel/smpboot.c > +++ b/arch/x86/kernel/smpboot.c > @@ -545,7 +545,7 @@ static int x86_core_flags(void) > #ifdef CONFIG_SCHED_SMT > static int x86_smt_flags(void) > { > - return cpu_smt_flags() | x86_sched_itmt_flags(); > + return cpu_smt_flags(); Based on: kernel/sched/topology.c: sd = highest_flag_domain(cpu, SD_ASYM_PACKING); rcu_assign_pointer(per_cpu(sd_asym_packing, cpu), sd); and described at: include/linux/sched/sd_flags.h: /* * Place busy tasks earlier in the domain * * SHARED_CHILD: Usually set on the SMT level. Technically could be set further * up, but currently assumed to be set from the base domain * upwards (see update_top_cache_domain()). * NEEDS_GROUPS: Load balancing flag. */ SD_FLAG(SD_ASYM_PACKING, SDF_SHARED_CHILD | SDF_NEEDS_GROUPS) doesn't your change result in sd_asym_packing being NULL? The SD_ASYM_PACKING flag requires all children of a domain to have it set as well. So having SMT not setting the flag, while CLUSTER and MC having set the flag would result in a broken topology, right? Thanks, Ionela. > } > #endif > #ifdef CONFIG_SCHED_CLUSTER > -- > 2.25.1 > >