From patchwork Wed Sep 13 13:11:23 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: 139133 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:a8d:b0:3f2:4152:657d with SMTP id gr13csp131811vqb; Wed, 13 Sep 2023 15:50:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEwZidCXz9BtH+5+IqxTmhTqdhbkpEzxuDkLPvTk0mmY1reafdKAQcfRhJ+ktqSNyFQkEPu X-Received: by 2002:a05:6a00:150b:b0:68c:3f2:5ff8 with SMTP id q11-20020a056a00150b00b0068c03f25ff8mr4015192pfu.1.1694645429988; Wed, 13 Sep 2023 15:50:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694645429; cv=none; d=google.com; s=arc-20160816; b=qjpZzBDL+5jb5Nn6YjaehdzzeVg1/eZY20P/wvP1hnYDecvm6pz85OFvwJruGM1ARR FOro3YdJivOnw+ocpVMloqTvR1nEhOzCa5LKEXSzX0LXRb8X5udrAiqloKaDvENDfg7k ZXfrw/taaI1PiDcO9n1RJ2hhqmLEcJ9zJHDBkfvxm7u9oi5rFq2EUMewMhqULswF41ZH ddpWJRXO3L7vuimsYPHghkvlT9AsB6yF7fv/Zb8lkfspwvzyZoaFQsWQ7uW6970zeo5a 9YXxBENz+khItFt/4CcE7PXf7bR/7XN4L4HeY8wMUqzXK5MtFySpG5UB/JEVbbfJt+1/ SbZA== 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=s2/+Mvh5cqPllsRgnhsiP+Ezg6RX38VwCf9VMBpGEyw=; fh=nQoU49SmQQqsgAwv4mUyZIEeIknsFzi5Mt2VRyQDyps=; b=IqmFxBbt/duJnSXyjJkuzWQNg7/6kayruOYaPPa+tVmMTV7GgbxDxDLzNE/f5UI0cW KSGkjcwr5n/AJJemr2eJaK3+tPprXsaZ9UoOQJ3+UAi2eFEuPES/5YVUd92zyLsFdXl8 o0yOFcpyHe1P/wX8ykD1wsfSPnYMj2VE+iQG0EcO0lEkYOmxyVohIYOn+C39+gjQ5cYj 14+wAznsRE9Mz+zK5PhAFIzQs0ksOYSRaM2bH7bb7xUXvXz69ZHrrykgGOL0rjDLl4kr sn202HXZKcQ4mi5F1LqBV0nqlsVbaNhRIlV3Ixsa7YshlhWZWe6F9d5YqrZSrj71jdK7 800Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qyA45qs3; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id dw9-20020a056a00368900b0068c0323c2b7si222886pfb.172.2023.09.13.15.50.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 15:50:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qyA45qs3; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 4EB4A80752AD; Wed, 13 Sep 2023 06:12:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240835AbjIMNLm (ORCPT + 36 others); Wed, 13 Sep 2023 09:11:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240829AbjIMNLa (ORCPT ); Wed, 13 Sep 2023 09:11:30 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C7991BCC; Wed, 13 Sep 2023 06:11:25 -0700 (PDT) Date: Wed, 13 Sep 2023 13:11:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1694610683; 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=s2/+Mvh5cqPllsRgnhsiP+Ezg6RX38VwCf9VMBpGEyw=; b=qyA45qs31qqRYZHv5iFhBccc1jTl2webYpOf9fPd1B599MjaQDLVQ8ZWT7fYcFbUg2ovHb rocshxCCix06uRkLLNH2p2Bf4xD0qEigBUaDpzD3IMyxsE7sbhiJvwhAxomRjQZqTzFIWr +dX4dU4yU8GrtUEGCfWYjZqikuCJaIymIJWZLD7eSPMl7quu7U334sxQ5h/hyXGLBKknPE tZ9/cg3mOuMA0i42PikVEPbTTg8x/G54kc9qN/5/E+TAcetH39m9EjqWH7BCjCukJ/09nY imsavOr9Y6EfVzkL78xoq7DTiyEj1duTEJy8sD37pRzMjv/z4bFtnUxCav7aHA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1694610683; 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=s2/+Mvh5cqPllsRgnhsiP+Ezg6RX38VwCf9VMBpGEyw=; b=J0+B6wyw4TsJ5Pmt4My66OqQifMEeCoqxV4k4u32QYqCDrW1lkDaIXeeR6egnFIRhPIkrA iVmEOltdXkVzJEDA== 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)" , Ingo Molnar , 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: <169461068306.27769.5699111625693906203.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 (groat.vger.email [0.0.0.0]); Wed, 13 Sep 2023 06:12:26 -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 groat.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776849813530348899 X-GMAIL-MSGID: 1776964526349922415 The following commit has been merged into the sched/urgent branch of tip: Commit-ID: 108af4b4bd3813610701379a58538e3339b162e4 Gitweb: https://git.kernel.org/tip/108af4b4bd3813610701379a58538e3339b162e4 Author: Ricardo Neri AuthorDate: Mon, 14 Aug 2023 20:57:47 -07:00 Committer: Ingo Molnar CommitterDate: Wed, 13 Sep 2023 15:03:18 +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) Signed-off-by: Ingo Molnar 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) }; }