Message ID | 20231020213100.123598-6-tony.luck@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp1334864vqb; Fri, 20 Oct 2023 14:32:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDTO48PhO8zSo1E830FIld8B2xnotmI+Hu8oQke++90/3GBx13U4vWVxIpc2vohyCiLQRl X-Received: by 2002:a05:6358:7211:b0:166:e43e:6f5b with SMTP id h17-20020a056358721100b00166e43e6f5bmr4346771rwa.16.1697837550696; Fri, 20 Oct 2023 14:32:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697837550; cv=none; d=google.com; s=arc-20160816; b=DXFh0YlJNmcYk+hYTG6wZ0WgKRz1znfUBVJDysqMQKOH/GpplqFn4uc8pLOq9O9OKO 4u60EFK+rhBEzpZcHxZqkVDuV6BAJTsq4wxLus1HCtMBx3q1Pz+MdSvE9KAScabsgLF6 dwdvW01mkqHOJyAps9PkD7uY03gdEiHIawlHaElVHdowIK2a9iXPc28VpNmd0Ip+wNVB tJ4tcCc4WixwTlCwIhti15tsxfCLCc3cO3KrsmpbqeyrWkUpJHVpUywZdqnGk7D/Wfn0 wS4apyI9BYVL3gTApeqOpJzbI3MDGMl3Dn05VIjClIxOr4FQzGdfQe+wD2t3EBKokP/V fXcw== 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=bJxASSPuvmwMxJTNoNOK+2VNCwjl6EbdgGi9X1zlpyM=; fh=EIH9XAmicvPIUSP7TBeBhZ/WaoqG49JQ3xV1i3Gl7Co=; b=RQa8RHkKXaS/VSL6gBdq1GmemUMSJng6QJHlyD9z/7eDkcS41mPLN06BEOGVSzzbDQ lMGeU9mKUajTMDoVf5fEGVJTtkYwZ2CO/Hy7W4vLN9A5zGYa76Dqwpd7OhJqo0c4/7y6 ynCz03r2doJ7Wx2vFXKWjPemM8yJS5CnO010a/OCnv2vHRV6YRe33FMkSPmEyLPylQfh /1hQzK3Q45zZ8WVSUwHfMkB/Y74iXIOE1PAWg1rrjG55aESkVHJVnItA7fVXxcL+Vg6h q61IoiHvzsyY607cQ2Xxi6EZ322N14p+NjlSKUDRLw/UfDYOoHn2Jfg9tQXcvt2Znorr eEPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=j6X7SlMZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id p24-20020a63e658000000b00578dfc8f11asi2503619pgj.792.2023.10.20.14.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 14:32:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=j6X7SlMZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id DB94481B4542; Fri, 20 Oct 2023 14:32:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233155AbjJTVcF (ORCPT <rfc822;a1648639935@gmail.com> + 26 others); Fri, 20 Oct 2023 17:32:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233086AbjJTVbw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 20 Oct 2023 17:31:52 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D58C10C7; Fri, 20 Oct 2023 14:31:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697837504; x=1729373504; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PPC1r6dgSPwk3Jqy3pzMArl9dtHBn43K2YX6uqco7UE=; b=j6X7SlMZ/GQZBQyWlApthWYEglyZpVOGharWjDYOC0HyCTzyBKJhz1Ek 1eSKP9z+uapE4eTsTNKeWPunTaDmgb84mRZQs6Jl4Zj/gnxqb16j1Xm3l u166zFzkScZwYylBQjRPghtvmIUyXX/SAxA11x4liWH3BUT9wosxfrgvQ xwxT6CzJCyWz6VpYVpDV+7I80wsW22u8fVAKZv/J+Rpxo1CkBLGj1Br1A u6muacgWZ9jW0e+RR3GryvGDFmXgQJFmo012zxuXr25GvIBQsxSvLX2zR 28xpI7RKZhfrsiWMiLoTPWhky0sxPybpZOwFGhSXWds9lFs4d17563Jh2 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="371647155" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="371647155" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 14:31:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="881184516" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="881184516" Received: from agluck-desk3.sc.intel.com ([172.25.222.74]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 14:31:10 -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 v9 5/8] x86/resctrl: Add node-scope to the options for feature scope Date: Fri, 20 Oct 2023 14:30:57 -0700 Message-ID: <20231020213100.123598-6-tony.luck@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231020213100.123598-1-tony.luck@intel.com> References: <20231003213043.13565-1-tony.luck@intel.com> <20231020213100.123598-1-tony.luck@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,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 agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Fri, 20 Oct 2023 14:32:22 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778054133068408317 X-GMAIL-MSGID: 1780311707658820338 |
Series |
Add support for Sub-NUMA cluster (SNC) systems
|
|
Commit Message
Luck, Tony
Oct. 20, 2023, 9:30 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. Reviewed-by: Peter Newman <peternewman@google.com> Signed-off-by: Tony Luck <tony.luck@intel.com> --- No changes since v6 except to add Peter's review tag 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 4778ef71c893..683706355810 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -172,6 +172,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 bcc4bd2e1930..2c3975c9c20c 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -515,6 +515,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; }