From patchwork Tue Sep 12 15:15:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 138296 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp527267vqx; Tue, 12 Sep 2023 09:27:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1eWEsxWALQduk9rfL4NHIqucXK3T2u3jnETSC6hss2NWM1nEVfaRqOEKkJxSEu71+w3kQ X-Received: by 2002:a05:6a00:1805:b0:68f:dfda:1814 with SMTP id y5-20020a056a00180500b0068fdfda1814mr276051pfa.18.1694536031720; Tue, 12 Sep 2023 09:27:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694536031; cv=none; d=google.com; s=arc-20160816; b=CKHiRM/wfW/P3xfJxAL1yViD3hy7sH52ehR0fHYfhvPhWpxT9M4tOsLVfg9I6LZM9U bB3++UThcgSZY5GYj8HZ2nYIkRf4OkrQtAFLd1ajRqjNGRgZn33ZER6oEL0H0hNj+GRW 54ykD7wLhpf03RpaUx1YeD77G8sCLimfzAhUU71mlwopEDdsjcunPXapWZngRYUt0yKQ UjFwnojO348haQs2iidjB3GYEIcVAjuuavd9KZU1kvT0I7gsZiGBD5fr/cjY2CSzVLPO rgr9RnA+ZouNopzGyadQrjfzHjADe+jRzhnzj2nCgxGLG+gvdfDeJlCIMfFgcSUv/a8A qRiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=6BA9ZKtT0aHe5e3qMEBNzLmWzYUXRj7Y7VShceSJve8=; fh=xlMCYJv89QEukwhkkHIdY4YzIcUolL6+ThrEiyR9b3U=; b=Vcyz8XSM5pV2FqUaY+jzT1xjnT9iu/BZ50PtVL7srkbdsR5dhTzAjSfmVEBfoV1ozB 505VkTCz8EV4oVTUAVmgqxc2Cd2JqPwn35IAc1aOszcUi3ik0XNR7oyzCCB16VgDblnI NX4H8q3+wPOS+Tbc/Fj6HMddimJJ/i/Y6BR8K/K+orlXqSEKsLOWt70IcRw91DaKyTR/ u03cUMNDruGJEvN6/cyqrUVBFbceZZKxrmPU2zeyPQKFfIUtORcgqkKEh3EvvAE0NPWX orT+5/FRkQVMX/FBfhdu8eaMGz3y4ThxrVccTWhslmoKxsODupprmG2cTiiJvnPLWwT7 fsBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=HHQZMT8d; dkim=neutral (no key) header.i=@linutronix.de header.b=JviQWbSr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id z11-20020aa7888b000000b0068a55cc9a10si3534065pfe.381.2023.09.12.09.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 09:27:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=HHQZMT8d; dkim=neutral (no key) header.i=@linutronix.de header.b=JviQWbSr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id BE4418030991; Tue, 12 Sep 2023 08:15:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236256AbjILPPm (ORCPT + 37 others); Tue, 12 Sep 2023 11:15:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235748AbjILPPl (ORCPT ); Tue, 12 Sep 2023 11:15:41 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A7E612E; Tue, 12 Sep 2023 08:15:37 -0700 (PDT) Date: Tue, 12 Sep 2023 15:15:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1694531735; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6BA9ZKtT0aHe5e3qMEBNzLmWzYUXRj7Y7VShceSJve8=; b=HHQZMT8dNPjtgGXmkNo4IQU5gdwvp4W35HMijNmyAoHxp1ckfDFFWJjTEeGC016Qx5BtwQ sVtFKnTaHvcSD72rZPyKTk6yq5906WXohUEeBvbnaxdRiAxK2Pseh2NFcqHDpXThEQ6sJK YjCRJ/9kS+7sEzYavaWlrz98EKGWKpsGRsAdLPnM1ZA8jEos8Ilg+T3V5a6NUZ+aBg0SGh 9sAm3g7Lplx3g32bePhfJcGFFa0hNBUihauZGqNgaH6Z7aUmL3DqSqSszP268wGal6GE3U sZPhvgvlB1zAaHn6BamSo/vGubnS544XUzPy9ZeXj4+IxPI4QAQu873tl9pxaQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1694531735; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6BA9ZKtT0aHe5e3qMEBNzLmWzYUXRj7Y7VShceSJve8=; b=JviQWbSrlIFhCbUAT8mYU5SuZI9jfFJ5i1JHGBOaLTpMD/qA8Ys5JEOueIdaQZfiYqlooz Ypg5E4xPWpG5tgDg== From: "tip-bot2 for Ricardo Neri" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/urgent] x86/sched: Restore the SD_ASYM_PACKING flag in the DIE domain Cc: Ricardo Neri , "Peter Zijlstra (Intel)" , Chen Yu , Caleb Callaway , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230815035747.11529-1-ricardo.neri-calderon@linux.intel.com> References: <20230815035747.11529-1-ricardo.neri-calderon@linux.intel.com> MIME-Version: 1.0 Message-ID: <169453173405.27769.6423819752573472154.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails 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 (lipwig.vger.email [0.0.0.0]); Tue, 12 Sep 2023 08:15:49 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776849813530348899 X-GMAIL-MSGID: 1776849813530348899 The following commit has been merged into the sched/urgent branch of tip: Commit-ID: c7d1d6e2b9e555d18d5e742fa67a16a0f36ef8d6 Gitweb: https://git.kernel.org/tip/c7d1d6e2b9e555d18d5e742fa67a16a0f36ef8d6 Author: Ricardo Neri AuthorDate: Mon, 14 Aug 2023 20:57:47 -07:00 Committer: Peter Zijlstra CommitterDate: Tue, 12 Sep 2023 17:07:34 +02:00 x86/sched: Restore the SD_ASYM_PACKING flag in the DIE domain 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]. Fixes: 8f2d6c41e5a6 ("x86/sched: Rewrite topology setup") Signed-off-by: Ricardo Neri Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Chen Yu Tested-by: Caleb Callaway Link: https://lkml.kernel.org/r/20230815035747.11529-1-ricardo.neri-calderon@linux.intel.com --- arch/x86/kernel/smpboot.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index d40ed3a..266d05e 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,14 @@ static int x86_cluster_flags(void) return cpu_cluster_flags() | x86_sched_itmt_flags(); } #endif -#endif + +static int x86_die_flags(void) +{ + if (cpu_feature_enabled(X86_FEATURE_HYBRID_CPU)) + return x86_sched_itmt_flags(); + + return 0; +} /* * Set if a package/die has multiple NUMA nodes inside. @@ -640,7 +646,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) }; }