Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3357500rdb; Wed, 13 Sep 2023 09:33:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF1KBAiYh3IKTPO+9+tnpLJEDP79Alu72ywNQM9lTch0gZeIA8SirG0E1lIzciE7G5CnlW1 X-Received: by 2002:a17:902:76c9:b0:1bc:10cf:50d8 with SMTP id j9-20020a17090276c900b001bc10cf50d8mr3020891plt.23.1694622818393; Wed, 13 Sep 2023 09:33:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694622818; cv=none; d=google.com; s=arc-20160816; b=VMGgXMVj8g3EGrGZ4FhaZLlX3041gTHzKsPOellYWLtwKhqZ9p8FCAGlSM9LMDEeEf VviTDM5kICBs0aviuzQcnxub0Mk7oi8VZMkF3R7BYCvzMYH/KJn7ucKCW9uqmhoOIVrb e3pxg0TDzWguBw6feEf1PApTboB8eEJt2AcCXvJrCwDtnDMv07HPWtEvc63KWf04hwbY 6ZWJK+KDeg/U4QxMKICqITT+GtGLGzytpFbWmfNB0LbXU+MBepL/6vZrzYfFkHZamfWX 6nUlzbnAq7mfJKUh91jrm+xIjjUw7m/6Qd3l/jI49UelOxE8vDBqMcflgYbHF4UgMPnz V95w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=zue/EDy9ELkob/hrzi4X2Qk/750b2xp6Vi3KtgAKpO0=; fh=vF1cHUji4oq2qbVRa6MoKv+LAPbxoTeM+uJG62FCOe8=; b=yfLhMRDQ7WnqtNXzDxpeteN9XuKpbO5UmuwbHZ9FqPNCj6aOT6lmrsht9jQ4PIfP3U MVEYovoc250XPKU7ISf1mAn41HXo6by8TzLYj+cAOqOcTfFgQAnroYtAxFrrEj42VnrW julIs4MFipK2cWfa97y0pk3fDDI/ydt49R23lEAumbp5n7I7I1GXxR1TKbbVzOhs4ki6 IEkG6ZbXK0nw5S9Lo6AGJKhrbISnY29gc3l191CnzPxaEHM3xu+fyOavja975f5icRpO 5RUBQn4DN4y9f5wy6kQath0ChLqfhYRjd2YUoMvRARomhb6KiHochRVX2UP9eTF5pRdq woBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=htfKpe1h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id y20-20020a170902b49400b001b89bd6fd59si10255383plr.215.2023.09.13.09.33.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 09:33:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=htfKpe1h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 7051282CFA5C; Mon, 11 Sep 2023 21:35:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239427AbjILCfa (ORCPT + 99 others); Mon, 11 Sep 2023 22:35:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238282AbjILCfU (ORCPT ); Mon, 11 Sep 2023 22:35:20 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6928E1048B8 for ; Mon, 11 Sep 2023 16:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694474885; x=1726010885; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=bqP0Il+KP9ktuev/OAY3TtppS1gH4Re3PyzXmCZnwLA=; b=htfKpe1hiICmwyU1np7QsEBEJOwMYBZxDQ5OAlMR9QInAOdu5e1yW2X3 syoGZBij4Bt6EqvMO44PODS0SBpoyhMpSps8FM3u3H/7bUQbGeEDSITAP bmrM5Jg2LzJ2KIjaV4WHpqUoIKqos6aTb8w9jgRX+WFqT743axbbHtVkk Wntedk08YK0LTam0hYEPiuohGRVtETMFXnhiqX82KPiB2eveBxKhJRaND MRNSwMF8eW060eyuTh49rYOMl4pLDpciuXV5J/ffoDqVW8HdoTA5wfNlv nBdk4R4pZsbcEgNJeAih8aAfCsC34lCWrMewQSZe+0wlo+KwHNka/1rDZ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10830"; a="444663321" X-IronPort-AV: E=Sophos;i="6.02,244,1688454000"; d="scan'208";a="444663321" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2023 16:14:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10830"; a="772769867" X-IronPort-AV: E=Sophos;i="6.02,244,1688454000"; d="scan'208";a="772769867" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by orsmga008.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2023 16:14:15 -0700 Date: Mon, 11 Sep 2023 16:16:24 -0700 From: Ricardo Neri To: "Peter Zijlstra (Intel)" Cc: "Ravi V. Shankar" , Ricardo Neri , Ben Segall , Caleb Callaway , Chen Yu , Daniel Bristot de Oliveira , Dietmar Eggemann , Len Brown , Mel Gorman , Steven Rostedt , "Tim C . Chen" , Valentin Schneider , Vincent Guittot , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/sched: Restore the SD_ASYM_PACKING flag in the DIE domain Message-ID: <20230911231624.GA16338@ranerica-svr.sc.intel.com> References: <20230815035747.11529-1-ricardo.neri-calderon@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230815035747.11529-1-ricardo.neri-calderon@linux.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 11 Sep 2023 21:35:55 -0700 (PDT) On Mon, Aug 14, 2023 at 08:57:47PM -0700, Ricardo Neri wrote: > Commit 8f2d6c41e5a6 ("x86/sched: Rewrite topology setup") dropped the > SD_ASYM_PACKING flag in the DIE domain added in commit 044f0e27dec6 > ("x86/sched: Add the SD_ASYM_PACKING flag to the die domain of hybrid > processors"). Restore it on hybrid processors. > > The die-level domain does not depend on any build configuration and now > x86_sched_itmt_flags() is always needed. Remove the build dependency on > CONFIG_SCHED_[SMT|CLUSTER|MC]. > > Cc: Ben Segall > Cc: Caleb Callaway > Cc: Chen Yu > Cc: Daniel Bristot de Oliveira > Cc: Dietmar Eggemann > Cc: Len Brown > Cc: Mel Gorman > Cc: Steven Rostedt > Cc: Tim C. Chen > Cc: Valentin Schneider > Cc: Vincent Guittot > Cc: x86@kernel.org > Cc: linux-kernel@vger.kernel.org > Fixes: 8f2d6c41e5a6 ("x86/sched: Rewrite topology setup") > Reviewed-by: Chen Yu > Tested-by: Caleb Callaway > Signed-off-by: Ricardo Neri > --- > arch/x86/kernel/smpboot.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c > index d7667a29acf3..944008c72754 100644 > --- a/arch/x86/kernel/smpboot.c > +++ b/arch/x86/kernel/smpboot.c > @@ -579,7 +579,6 @@ static bool match_llc(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o) > } > > > -#if defined(CONFIG_SCHED_SMT) || defined(CONFIG_SCHED_CLUSTER) || defined(CONFIG_SCHED_MC) > static inline int x86_sched_itmt_flags(void) > { > return sysctl_sched_itmt_enabled ? SD_ASYM_PACKING : 0; > @@ -603,7 +602,12 @@ static int x86_cluster_flags(void) > return cpu_cluster_flags() | x86_sched_itmt_flags(); > } > #endif > -#endif > + > +static int x86_die_flags(void) > +{ > + return cpu_feature_enabled(X86_FEATURE_HYBRID_CPU) ? > + x86_sched_itmt_flags() : 0; > +} > > /* > * Set if a package/die has multiple NUMA nodes inside. > @@ -640,7 +644,7 @@ static void __init build_sched_topology(void) > */ > if (!x86_has_numa_in_package) { > x86_topology[i++] = (struct sched_domain_topology_level){ > - cpu_cpu_mask, SD_INIT_NAME(DIE) > + cpu_cpu_mask, x86_die_flags, SD_INIT_NAME(DIE) > }; > } > Hi, just checking if there are any comments on this patch?