Message ID | 20231204185357.120501-6-tony.luck@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp2967299vqy; Mon, 4 Dec 2023 10:54:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGYGf+1/nC/bxkiVqUJek+mITSk4jePskZ4311/fVuT8FXvf6ONVwUatRgZorRpZJg5/Nam X-Received: by 2002:a17:90b:3586:b0:286:6cc1:8656 with SMTP id mm6-20020a17090b358600b002866cc18656mr30387pjb.59.1701716063156; Mon, 04 Dec 2023 10:54:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701716063; cv=none; d=google.com; s=arc-20160816; b=tZ6pWqflDAf9t/nXVa6kyu8M57n1a0KFGz2M8h5EByc3ulaJhmcVbCF35fwVJTyZfC F1TYHqIDVZlpDN8h2EWr8iFJB5EGGkgmFaUX462KbXZphZTEubM3n4uoX8e64HGLXAu8 wepVbk8R0PPZUdagrx+8UBivVeEcI68sf1haUy8csEF8C3+UQRCo3hh1sFqiTMOZnrZW EoUdcUtliupGCOBaJN32tfTBTcIMnYLUkIgVgJqVnCoDL7SmkvvA4rP8YYdKby4mYn7C 15FyxVVQfa84Ox+84ntQE7p0n8okbWKIUk5QSVLAoZDyH/I4uvwuEuebB/0Mb2sbWArO v+sw== 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=oc8DKZduiAtT4he+/uuReGEWSVTp1p1hzPMmB9nq448=; fh=Vn7xSirI6nqm5i0/AysSYQOSFcHB81/IRDfzPMkc31I=; b=W2/SjapiXVxVunSbQdLubmKXKOz9Ow9wJw5H3AmdnUmCMhlWow6I14+VDoEeiCBtAH Qu6Trtue6Yf4S/uEmG1XIsMpS7sExGB75UhH0RTxJxdauDNLmOkE0Qtwc46wMc4IL0FI Qe8YN5T1UBiDkUarW3vMGtBNNl/Amo+sdqCWNA16IBeDuI++oAuXFUkiqAzdyQPnbVaC 2yvg7VQ2m0vKn2mDvWRt+unNNrXG0WxwHhfGvpBD5Yu27j4vXlVsHeIQ2wDlgAPZ28uB oBoI5zwb9f/aRMpBBitwEUZ7hHJ1c3ZRtFqxnasueheCTnGPSPtv8yMJyFZSsSEWJF5Z W0PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZGD75bn9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id mq7-20020a17090b380700b00285be1801d8si8565388pjb.101.2023.12.04.10.54.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 10:54:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZGD75bn9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 2B954804E691; Mon, 4 Dec 2023 10:54:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231282AbjLDSyL (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Mon, 4 Dec 2023 13:54:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231266AbjLDSyG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 4 Dec 2023 13:54:06 -0500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5769810F; Mon, 4 Dec 2023 10:54:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701716051; x=1733252051; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TkM1/qfG9rVOu2jJBDBlxItgf0eq8sR4sTuDIQX/ctA=; b=ZGD75bn9WW1kk/tdif/KdFJpArcjp1n3wtP1REKmowQvwzlWSAOPhdap 9sjARsel7Vg55XIL3tfv12XcQIxx0Ye+bmXUJVHgi4IK3G65c3MKTWF5l cNKNki59HLgkaD9Md/WwDUYreQzPLQDCs1Y0PaQUvq/JqQksC7CVP2xXP gqYF7/fZXBP+CUp2552bHy7L/KtQspdVlPElVuyGOo+OjGUhjH/Knddpn y7RrvtAixY/Dy1I9FCCGXEzrqjItZURLyLE7J6oFmZm0NtPxWVoIivn4k OPV9wXAnu+iPKuUcYyMbUIX9MRCUqQdA9kByV+cAwSnYqymrF5aKnJO5i w==; X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="838504" X-IronPort-AV: E=Sophos;i="6.04,250,1695711600"; d="scan'208";a="838504" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2023 10:54:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="836687201" X-IronPort-AV: E=Sophos;i="6.04,250,1695711600"; d="scan'208";a="836687201" Received: from agluck-desk3.sc.intel.com ([172.25.222.74]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2023 10:54:07 -0800 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>, Shaopeng Tan <tan.shaopeng@jp.fujitsu.com> Subject: [PATCH v13 5/8] x86/resctrl: Add node-scope to the options for feature scope Date: Mon, 4 Dec 2023 10:53:54 -0800 Message-ID: <20231204185357.120501-6-tony.luck@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231204185357.120501-1-tony.luck@intel.com> References: <20231130003418.89964-1-tony.luck@intel.com> <20231204185357.120501-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,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 (snail.vger.email [0.0.0.0]); Mon, 04 Dec 2023 10:54:22 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778054133068408317 X-GMAIL-MSGID: 1784378622364663240 |
Series |
Add support for Sub-NUMA cluster (SNC) systems
|
|
Commit Message
Luck, Tony
Dec. 4, 2023, 6:53 p.m. UTC
Currently supported resctrl features are all domain scoped the same as the scope of the L2 or L3 caches. Add RESCTRL_NODE as a new option for features that are scoped at the same granularity as NUMA nodes. This is needed for Intel's Sub-NUMA Cluster (SNC) feature where monitoring features are node scoped. Signed-off-by: Tony Luck <tony.luck@intel.com> Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com> Reviewed-by: Peter Newman <peternewman@google.com> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com> --- include/linux/resctrl.h | 1 + arch/x86/kernel/cpu/resctrl/core.c | 2 ++ 2 files changed, 3 insertions(+)
Comments
On 12/4/2023 12:53 PM, Tony Luck wrote: > Currently supported resctrl features are all domain scoped the same as the > scope of the L2 or L3 caches. > > Add RESCTRL_NODE as a new option for features that are scoped at the > same granularity as NUMA nodes. This is needed for Intel's Sub-NUMA > Cluster (SNC) feature where monitoring features are node scoped. > > Signed-off-by: Tony Luck<tony.luck@intel.com> > Tested-by: Shaopeng Tan<tan.shaopeng@jp.fujitsu.com> > Reviewed-by: Peter Newman<peternewman@google.com> > Reviewed-by: Reinette Chatre<reinette.chatre@intel.com> > Reviewed-by: Shaopeng Tan<tan.shaopeng@jp.fujitsu.com> Reviewed-by: Babu Moger <babu.moger@amd.com> > --- > include/linux/resctrl.h | 1 + > arch/x86/kernel/cpu/resctrl/core.c | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h > index 058a940c3239..b8a3a11b970d 100644 > --- a/include/linux/resctrl.h > +++ b/include/linux/resctrl.h > @@ -170,6 +170,7 @@ struct resctrl_schema; > enum resctrl_scope { > RESCTRL_L2_CACHE = 2, > RESCTRL_L3_CACHE = 3, > + RESCTRL_NODE, > }; > > /** > diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c > index 797cb3bf417a..c9315ce8f7bd 100644 > --- a/arch/x86/kernel/cpu/resctrl/core.c > +++ b/arch/x86/kernel/cpu/resctrl/core.c > @@ -502,6 +502,8 @@ static int get_domain_id_from_scope(int cpu, enum resctrl_scope scope) > case RESCTRL_L2_CACHE: > case RESCTRL_L3_CACHE: > return get_cpu_cacheinfo_id(cpu, scope); > + case RESCTRL_NODE: > + return cpu_to_node(cpu); > default: > break; > }
diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h index 058a940c3239..b8a3a11b970d 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -170,6 +170,7 @@ struct resctrl_schema; enum resctrl_scope { RESCTRL_L2_CACHE = 2, RESCTRL_L3_CACHE = 3, + RESCTRL_NODE, }; /** diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c index 797cb3bf417a..c9315ce8f7bd 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -502,6 +502,8 @@ static int get_domain_id_from_scope(int cpu, enum resctrl_scope scope) case RESCTRL_L2_CACHE: case RESCTRL_L3_CACHE: return get_cpu_cacheinfo_id(cpu, scope); + case RESCTRL_NODE: + return cpu_to_node(cpu); default: break; }