Message ID | 20231130003418.89964-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 r17csp67429vqy; Wed, 29 Nov 2023 16:34:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXs6oeiqofj8x134U9NxprJMxR0B4T1U8EYiA726cNGyyA2i1C4SG79Lc9ME90JYO6yRwH X-Received: by 2002:a17:902:ea03:b0:1cf:59df:23e with SMTP id s3-20020a170902ea0300b001cf59df023emr23565774plg.12.1701304489534; Wed, 29 Nov 2023 16:34:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701304489; cv=none; d=google.com; s=arc-20160816; b=UfcMTMCJ0UIKQ4TUUZOPHSj3GK0aqXMzCSnAoqJHI/hYx+2HcK1dZ7YATa3yoVApZ6 i1bIFHgrzd10a7vK/SAqtG8Uvg0ypZ3FjHV7OIg7N+uF/c18qQzcyW0m6OBOaRaEd4/V obJKjeOwiGu2ztsPFfU+DUkU5echkoH3LNLkkF7E1dP8N7jPj7uo1b7+fBEH1XXt4eTy B3JYbJydg8vGlnhUawpyV/WL/cY3xMgEobqB8SbblL1NZsxK/7KaGUnYDfnkqvee7m4k Ik6DDoUd+bpQUCqP12EVxDHmmuopUk6Nqf6TSyCrcvqZ5prJqpOuz3RZaEYV/tyT0v28 iFPw== 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=Mbb7taDxqXECeU9xZKUgL4mE8/50/iyyWhZb7Ah7u+8=; fh=Vn7xSirI6nqm5i0/AysSYQOSFcHB81/IRDfzPMkc31I=; b=XdW+eUMYcE4zlKwr8+Isj1MQLqTGKLIH7zLx8JpcQIsBTVAv17V36sbslrTn4bTixZ qaJYTK41FIdwkhr3VtYH4/XpzhZ2liiV47pANEAh3AhfuRDyn90DOdB+qtp8Rfwd6Qu+ gt7Zz1I8f6/xdgj/URoSwNuN/dnX+BiFv0upNsRiQVHjV3BMwt4wuv0Yii2k9hxbKhSj TluCH+fSTkjKhYvIojycdm8SIPHxd/J3izw1VfXbBvh6rAWUlJKdmwiaF4n1JhXly7sM UdQCgRHprBOOtKSCuKR/IF0G3VGQi/OLzKhQPYXyTYkgkiErp+jrmmaHqhlW3CBQT+sT YKdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KuC7tDRe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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. [23.128.96.37]) by mx.google.com with ESMTPS id p10-20020a170902bd0a00b001cf67883f24si14340029pls.264.2023.11.29.16.34.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 16:34:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KuC7tDRe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 52D21802C697; Wed, 29 Nov 2023 16:34:48 -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 S1343871AbjK3Aeb (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Wed, 29 Nov 2023 19:34:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343831AbjK3AeZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 29 Nov 2023 19:34:25 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C23171A6; Wed, 29 Nov 2023 16:34:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701304471; x=1732840471; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0ExlnLmiTlrkohGZSqFsp0HlE29uce6NiFPdS+zNCzA=; b=KuC7tDReSHIpjOQWcF/GMuhjhc0eLt2wOub5fb4l9ujojq+6KSvLWVN7 sFvz3/K43cQsjXzOUVVB+5kOY90pYihaDM9YikGRuJV8b4Fr/SrqiV6RQ 4YU5V737DFeOHmb00xtTbQVs6/dP5uLiIEWtszexDPTX2FEACwvm0Kq9A IDqrE7B7szV9EWJfXRFGg9RsjD6z8MQWln8aiDo2L3XqauYBHq7YJKwUE eAgcUgokqRWb2PkL7p3sxV/gDP/qmZ2kBYJZ9PcNtlSatnEhDFmdC/WLd 2RXZbhK5in4pG5sN8oq5diBlPJ7KaSU2LIM8ZpIIVSkzxx12orK+VkUPd g==; X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="392990659" X-IronPort-AV: E=Sophos;i="6.04,237,1695711600"; d="scan'208";a="392990659" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 16:34:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="762499583" X-IronPort-AV: E=Sophos;i="6.04,237,1695711600"; d="scan'208";a="762499583" Received: from agluck-desk3.sc.intel.com ([172.25.222.74]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 16:34:27 -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 v12 5/8] x86/resctrl: Add node-scope to the options for feature scope Date: Wed, 29 Nov 2023 16:34:15 -0800 Message-ID: <20231130003418.89964-6-tony.luck@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231130003418.89964-1-tony.luck@intel.com> References: <20231109230915.73600-1-tony.luck@intel.com> <20231130003418.89964-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,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]); Wed, 29 Nov 2023 16:34:48 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778054133068408317 X-GMAIL-MSGID: 1783947056592721666 |
Series |
Add support for Sub-NUMA cluster (SNC) systems
|
|
Commit Message
Luck, Tony
Nov. 30, 2023, 12:34 a.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> Reviewed-by: Peter Newman <peternewman@google.com> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com> Tested-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(+)
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; }