Message ID | 20231031211708.37390-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:abcd:0:b0:403:3b70:6f57 with SMTP id f13csp27892vqx; Tue, 31 Oct 2023 14:17:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHIS0uG3BzVGTdgHWnVx4IIUYD3zSsNOSNNVB9T/+TQR80JqsZrtEOXlIFZNHAorze6H4/+ X-Received: by 2002:a17:902:e805:b0:1cc:482c:bc46 with SMTP id u5-20020a170902e80500b001cc482cbc46mr8962271plg.34.1698787078848; Tue, 31 Oct 2023 14:17:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698787078; cv=none; d=google.com; s=arc-20160816; b=lKxamBsKWcHldscZEnltLMhUE2WNVfoDcaQch9tSkWr+GaiaJftUnyQMicXOpQ1x9r 3UZv7wXtKTE+4DC7jJDUuA2/V7rulfDXHwgRZeerbE34wuf14QZoUOjKUypOV8NkHAOM j63OSpFVRoqVMEsD9Ewrn1dMcj9u7QNh0a/KpAhweYro1EB+vqFEAcOBaN5XqrWwJ9vl MjvX6lTko/mDP8OK38HaCdzW+MEtSagxJn27mAgXjpFWJZR29rqFYSH2MlMX65ZvhX/z xgFKXFiMb0su/JmtWWrspjyHjUk7LZ7bP1IeI1JQubRVqYiCajDyWQgjrQddmZbQ2ooL FUrA== 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=iWFEhFcQK2rG8dDhVvBPbd62EJv1wwQ2qUG7H0kdVP0=; fh=EIH9XAmicvPIUSP7TBeBhZ/WaoqG49JQ3xV1i3Gl7Co=; b=B5GDs2omfK0kA0jLPQKTajBxGM4h1rd7Zf3U8X02UpGeCc4qygD/qoSoXCYW87lET/ ecLLgt09/NMv8PjMP2Fj4Cx3JSyuVtZRNEOM9icIylQ+4z93eKsHdMW3VEAqG/19IubI xGuYPi/gOBd4/FEXodZiR9mQpw1IaAUtaPVfDZTUiKdAOIdi/LHz/3dXlOt91w0zaVz4 T5YZl1aRQfOBsY3AorxoZ11ZDj8jWmQeKypbtBmAnOM66Di5iAtF29IFeo97L6EGQhlR B79oKhFoAp8iPOmuKwPVaiiyiRWIE5t+gAlzlREbqJHzpfRrY6pPMMmbXqSfEJYkwz/R XcsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OYXQzqGN; 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 h17-20020a170902f2d100b001c3b4eb2135si1504571plc.463.2023.10.31.14.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 14:17:58 -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=OYXQzqGN; 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 E79F7802EE68; Tue, 31 Oct 2023 14:17:52 -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 S1345522AbjJaVRa (ORCPT <rfc822;chrisjones.unixmen@gmail.com> + 33 others); Tue, 31 Oct 2023 17:17:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344823AbjJaVRY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 31 Oct 2023 17:17:24 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1ED5F5; Tue, 31 Oct 2023 14:17:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698787041; x=1730323041; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1NTG/xepP6sAVh64jc/TfBIlrbQchIPazZnyN72Ffzs=; b=OYXQzqGNwIVby41AJfiTL/lBycc38plrktdrZoBTq+bn+xieKEx2d2Kq cqN5hl3ajCH+BgiaOA60JkbkQ8+qwdPlhA08jg/DT5cDaQ5f+YO+0EEvq mcVKSmBpOO6CGZS+LkIf30jWCebCgmR4kwYkiqxdt6UGEbqgeV+XY7g6q VpWS1uCwPGUEFmIXobah1DjoSERksvPCLEaOuIA9QSPuz/kdZHbHLSL6G lZwAyaPID2VH5IamRSGvof7tL16z6ut5fekm9G2EGzxHJOltzig91aWlV sxM3bFv8lxg4JLIWUT5RakfzGDw6MnYKUcSafIAXKMocdbdlR56b9QvkD w==; X-IronPort-AV: E=McAfee;i="6600,9927,10880"; a="388197120" X-IronPort-AV: E=Sophos;i="6.03,266,1694761200"; d="scan'208";a="388197120" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2023 14:17:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10880"; a="884335004" X-IronPort-AV: E=Sophos;i="6.03,266,1694761200"; d="scan'208";a="884335004" 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; 31 Oct 2023 14:17:19 -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 v10 5/8] x86/resctrl: Add node-scope to the options for feature scope Date: Tue, 31 Oct 2023 14:17:05 -0700 Message-ID: <20231031211708.37390-6-tony.luck@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231031211708.37390-1-tony.luck@intel.com> References: <20231020213100.123598-1-tony.luck@intel.com> <20231031211708.37390-1-tony.luck@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.3 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,T_SCC_BODY_TEXT_LINE 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]); Tue, 31 Oct 2023 14:17:53 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778054133068408317 X-GMAIL-MSGID: 1781307359939013475 |
Series |
Add support for Sub-NUMA cluster (SNC) systems
|
|
Commit Message
Luck, Tony
Oct. 31, 2023, 9:17 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 v9 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 36503e8870cd..f42a5e59027b 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 6bae0a658b94..d2c1aa8411a3 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; }