Message ID | 20231003213043.13565-1-tony.luck@intel.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2363480vqb; Tue, 3 Oct 2023 14:31:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1VgQ2C11Z9u3wrNxRvHCeJJCUbC9OteYZZWObrfgd9GzMbEHGvq98KYkjJVJSNsetF1hF X-Received: by 2002:a17:902:d2c2:b0:1c7:3526:dfcd with SMTP id n2-20020a170902d2c200b001c73526dfcdmr629065plc.52.1696368706256; Tue, 03 Oct 2023 14:31:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696368706; cv=none; d=google.com; s=arc-20160816; b=dVERroVnMDoV0ly/LRDWmSkQTAN9fV4OllvEHLGRZq4v7DFsus2ilp9CJYybxiBxLM lf0zXtXG4k3kzlJtJ9CjJmVvZfbPnUx+V51CvsiY09B4gS4+trIzCVya9HOA/g8r9sNx Wbqvvz7Aseihrq9ZF+CxmFchQdteeqz4j0VGLEnbTVJlaLR9MMkUeff+Z2AuC59zeODa OcYtyJdKyeRRvM5KeUOIibhZvmg9TdxUX9kJArVHTpYL6cNL328TG0hbsJBoJHT6tJHz dO8+rApltFGkjmCYPGHIXFq2x3QTJndrq0KOuZxgmc1xXEBbCzzKr/Uk+EF4atHn4k8a 1tUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZQBeW66WHElerqqXFlYlrt5jVB/rT7KyWTezad4VNew=; fh=EIH9XAmicvPIUSP7TBeBhZ/WaoqG49JQ3xV1i3Gl7Co=; b=O03+fItE/nAMbdFH6k9ZBibi1pbuXRnNj60KpB+0FfjkBxLwr5VX2tNMcUXUG9vBPZ sIbLS8UpU7px/nEBNYrAZqzZ+eckXZyWVkGCO1DHvLmNPptlZYg8NdkYGK/Av8oBIyL2 qnOBI4+LBRah5kUTVhXd4YGZ9GoZpccdVZdQELfxCpX4DK9KdqALvFkwwFnu1b+G0ivT 955VlZWM2vG4DE2Ign7RplZ52Cq0kr4duLkz4zvyn0hKW/uGcfvaTnBFodTcxsmOiUWy XW7Bje1KoY4Ydsl3yH/z44QdLK8N2cyzt5eln8R3pXp+UUCa8fIXPeO6qSBkySILMWMI jDOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=A9FC3s2f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id i6-20020a17090332c600b001bc74f6a951si2640270plr.250.2023.10.03.14.31.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 14:31:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=A9FC3s2f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 E052480A8547; Tue, 3 Oct 2023 14:31:04 -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 S241238AbjJCVa6 (ORCPT <rfc822;chrisfriedt@gmail.com> + 17 others); Tue, 3 Oct 2023 17:30:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230251AbjJCVaz (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 3 Oct 2023 17:30:55 -0400 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A09E83; Tue, 3 Oct 2023 14:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696368651; x=1727904651; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wiY0eeufMNNk9jH1XIadte3o5RqKY1pTvxQYoyPVqyk=; b=A9FC3s2fKzgUgwgplzVW5p2uaVCqBtf7vnnwrQBdRzwYTEzdcTYPcrlO P8s0NIVQymbykh5hve9z68tt6U3V6x8NO6bgJYz6CsHSv1ckIvJ043dSe Dek9+D59WOsPiaM2wmeRloTwJIYAFjmz4GAbX1N8L27oFmu+BqignHZkb buXFbI296Sqknsc/VqjGJd9d9jfZD2iegyYRhR6KszU6JEG2avCZq5BrL Xxv0cwTFU6fn8XRx7eu+fRyisapCL/AIkF5S45lboKzQhLZ8vAIcDT+Yo KbYuO58guAj70DER5ulNduouS02dwnprLkyIog+eKO17m29z18gqmkxfy g==; X-IronPort-AV: E=McAfee;i="6600,9927,10852"; a="1580363" X-IronPort-AV: E=Sophos;i="6.03,198,1694761200"; d="scan'208";a="1580363" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 14:30:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10852"; a="924801966" X-IronPort-AV: E=Sophos;i="6.03,198,1694761200"; d="scan'208";a="924801966" Received: from agluck-desk3.sc.intel.com ([172.25.222.74]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 14:30:50 -0700 From: Tony Luck <tony.luck@intel.com> To: Fenghua Yu <fenghua.yu@intel.com>, Reinette Chatre <reinette.chatre@intel.com>, Peter Newman <peternewman@google.com>, Jonathan Corbet <corbet@lwn.net>, Shuah Khan <skhan@linuxfoundation.org>, x86@kernel.org Cc: Shaopeng Tan <tan.shaopeng@fujitsu.com>, James Morse <james.morse@arm.com>, Jamie Iles <quic_jiles@quicinc.com>, Babu Moger <babu.moger@amd.com>, Randy Dunlap <rdunlap@infradead.org>, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, patches@lists.linux.dev, Tony Luck <tony.luck@intel.com> Subject: [PATCH v8 0/8] Add support for Sub-NUMA cluster (SNC) systems Date: Tue, 3 Oct 2023 14:30:35 -0700 Message-ID: <20231003213043.13565-1-tony.luck@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230928191350.205703-1-tony.luck@intel.com> References: <20230928191350.205703-1-tony.luck@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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: <linux-kernel.vger.kernel.org> 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]); Tue, 03 Oct 2023 14:31:05 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772150361455667514 X-GMAIL-MSGID: 1778771512554205965 |
Series |
Add support for Sub-NUMA cluster (SNC) systems
|
|
Message
Luck, Tony
Oct. 3, 2023, 9:30 p.m. UTC
The Sub-NUMA cluster feature on some Intel processors partitions
the CPUs that share an L3 cache into two or more sets. This plays
havoc with the Resource Director Technology (RDT) monitoring features.
Prior to this patch Intel has advised that SNC and RDT are incompatible.
Some of these CPU support an MSR that can partition the RMID
counters in the same way. This allows for monitoring features
to be used (with the caveat that memory accesses between different
SNC NUMA nodes may still not be counted accurately.
Note that this patch series improves resctrl reporting considerably
on systems with SNC enabled, but there will still be some anomalies
for processes accessing memory from other sub-NUMA nodes.
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
Please ignore v7 posting. There was some glitch in how I created
the patches with "git format-patch" that meant part 0004 would not
apply.
Changes since v6:
* Fixed spelling of "accurately" in cover letter.
* Applied changes from Peter Newman's review
Link: https://lore.kernel.org/r/CALPaoChB5ryT96ZZBQb6+3=xO+A0uR-ToN0TWqUjLJ7bgi==Rg@mail.gmail.com
(and follow-on posts against other patches in the v6 series).
See comments in indivdual patches for specific details.
Added Peter's "Reviewed-by" to parts 4-7.q
Tony Luck (8):
x86/resctrl: Prepare for new domain scope
x86/resctrl: Prepare to split rdt_domain structure
x86/resctrl: Prepare for different scope for control/monitor
operations
x86/resctrl: Split the rdt_domain and rdt_hw_domain structures
x86/resctrl: Add node-scope to the options for feature scope
x86/resctrl: Introduce snc_nodes_per_l3_cache
x86/resctrl: Sub NUMA Cluster detection and enable
x86/resctrl: Update documentation with Sub-NUMA cluster changes
Documentation/arch/x86/resctrl.rst | 23 +-
include/linux/resctrl.h | 85 +++--
arch/x86/include/asm/msr-index.h | 1 +
arch/x86/kernel/cpu/resctrl/internal.h | 66 ++--
arch/x86/kernel/cpu/resctrl/core.c | 400 +++++++++++++++++-----
arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 58 ++--
arch/x86/kernel/cpu/resctrl/monitor.c | 58 ++--
arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 14 +-
arch/x86/kernel/cpu/resctrl/rdtgroup.c | 132 +++----
9 files changed, 591 insertions(+), 246 deletions(-)
base-commit: 6465e260f48790807eef06b583b38ca9789b6072
Comments
Tony, On 10/3/2023 2:30 PM, Tony Luck wrote: > The Sub-NUMA cluster feature on some Intel processors partitions > the CPUs that share an L3 cache into two or more sets. This plays > havoc with the Resource Director Technology (RDT) monitoring features. > Prior to this patch Intel has advised that SNC and RDT are incompatible. > > Some of these CPU support an MSR that can partition the RMID > counters in the same way. This allows for monitoring features > to be used (with the caveat that memory accesses between different > SNC NUMA nodes may still not be counted accurately. Almost. For reference: https://lore.kernel.org/lkml/e350514e-76ed-14ea-3e74-c0852658182f@intel.com/ No need to send a new series just for this, but this series does find itself at the back of my queue. > Note that this patch series improves resctrl reporting considerably > on systems with SNC enabled, but there will still be some anomalies > for processes accessing memory from other sub-NUMA nodes. > > Signed-off-by: Tony Luck <tony.luck@intel.com> Reinette
Hi Tony, I applied this patch series to kernel v6.5 and v6.6-rc4, but the kernel cannot be booted. Could you tell me what kernel version this patch series is based on? Best regards, Shaopeng TAN
> I applied this patch series to kernel v6.5 and v6.6-rc4, but the kernel cannot be booted. > Could you tell me what kernel version this patch series is based on? Hi Shaopeng, Patches are based on v6.6-rc3 (see the "base-commit" line at the end of the cover letter). Which CPU family/model/stepping & microcode are you testing on? Are there error or panic messages when it does not boot? -Tony
Hi Tony, On 10/5/2023 8:08 AM, Luck, Tony wrote: >> I applied this patch series to kernel v6.5 and v6.6-rc4, but the kernel cannot be booted. >> Could you tell me what kernel version this patch series is based on? > > Hi Shaopeng, > > Patches are based on v6.6-rc3 (see the "base-commit" line at the end of the cover letter). > > Which CPU family/model/stepping & microcode are you testing on? > > Are there error or panic messages when it does not boot? There is no need to ask Shaopeng for more information. If you test this series you will immediately learn that it is broken. Reading the series I only made it to patch #3 where I realized that this has not been tested before posting. Reinette