Message ID | 20240228193717.8170-7-tony.luck@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-85620-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3568664dyb; Wed, 28 Feb 2024 11:39:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUQC7fe6yZtUZqUg/7FG83elhYxb84wuJ7xLwFchlIuksR5B6G6F0yAl5/F1RAfR4Q7Qa9+F91OCjkB275a6lc5FGQZVQ== X-Google-Smtp-Source: AGHT+IFNW7KLVq1l59XBMc39F9U9UaVrmlepn9oKXPBgz3xNnJ2vN10fOyKMM+Ij6CCgSnrKusA5 X-Received: by 2002:a05:620a:1914:b0:786:9b73:3a0b with SMTP id bj20-20020a05620a191400b007869b733a0bmr43003qkb.41.1709149156374; Wed, 28 Feb 2024 11:39:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709149156; cv=pass; d=google.com; s=arc-20160816; b=HcLEIMw2LQUBXpzgBAoytoQ9pfEzAoY3hCc1uwA5w0SYi9OiiIdUyTh+Qw5cw6D6wt IHsKR/ius313Hcp7V7m1yWuEGJoO6BATn5bxygv/XVO7OjrccCzAUT3A9LQHRW1WL+Cc 5sMt08j0MHqrIltfl4W7sxH+SUxkLs+sAytP4S4uDVZpx8yAwsax+i4JWL1Ka2iFVh7r nGc8gaYaiwyNZ4NW1hUByLjGk4Ddo8RN/3nwZSOImwiphhZQj7NvNBPvvtBBnF/12TtL DXqMwW4ALW/ps8dhkckE8FiwBppQeBijTpvAFsoT5kmAsh6P30Xa7UoSYGzpCklPZT0Q qgIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=eoVdHKv9LhlwsEqq5w8jztDpNLWZ9S87TCXK8tjvAuw=; fh=kDu4WSgSKQjfqS0+uR7gDD47kd+EMQAW47hbuuOMwvI=; b=I8vaiCTezVZpj9mSXsEGDvxLDjHsm/Rf9mMGAlk/TbvTd5M/OnxqyepzyBb3Iz77fB 2eSt5Iq8HDr5EocTDTp0V+REsgIGg2VtpUYiER31ZIPLXFSR50S0Dpa22zq8eH6soSOd FbC9CkDnZ6w8CK0ZnilxsfbI0pSc+5XsO1c9Pjaksy7f4txLtpG3pR2u9p+6xmOOJMdF DNf3/aaz4tpEW0ZD7YHSIHhX6T5cbNAj6ly83ibEBY8+qqnyFjvVvGyeEKQ2PtCeCWId B6XTfmK5DKiPwFiUxJqyjVE+eAnXEU4x6AGPm9SVNO11Z4iG8K0YyJ9QmkwByYG85FUc ILCA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YlhkDThU; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-85620-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85620-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id wj25-20020a05620a575900b00787e3e17160si180434qkn.632.2024.02.28.11.39.16 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 11:39:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85620-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YlhkDThU; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-85620-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85620-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2C7F71C245AE for <ouuuleilei@gmail.com>; Wed, 28 Feb 2024 19:39:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E8237783D; Wed, 28 Feb 2024 19:37:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="YlhkDThU" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5B6B163A9B; Wed, 28 Feb 2024 19:37:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709149047; cv=none; b=oI080kstFuXlDRSNrZwtnhC+kICs/m8Dk/br0hHJ9yq0DGHGKMQGGd7CxRiK8fbARVvlwY7qGlUUYHdkXzCNlwRq6tu4pNMG6z1ZlRDBiIFxPs3YFXKWwlU+eZB6AhrS/LQ1N+O4pLk8boKxmsDKRsDWzIe1gv04Kt7iNKGffWE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709149047; c=relaxed/simple; bh=KwqVlzMvCSatbSbhZi5QVyiYc25iBbPunJU/yJjlwi4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GtZk99M4TUtQSRSlB544pLwAghvDgryX6GguA9Bz3auXodLtljP/Z5AuKBslwhvH83JhzOkNbCacSRb9mU/Nt9l662y3uCjMjwXKFhVaBv4udmrGv8HHzcTlTFMSBEgkXKoMDojOpSPYWzjUnJMvMfBYYRVH3des4JJfkqCUxNo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=YlhkDThU; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709149045; x=1740685045; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KwqVlzMvCSatbSbhZi5QVyiYc25iBbPunJU/yJjlwi4=; b=YlhkDThUtyK3dyHS+SSTbN3jHytT051UisDWmSTYn6uW2N8kqegiMdyC LRYzfPAfWTQy6AG9yyXDs1lJyKnME8XgsdthHvP83Vu6sWmPXdBLbFrvi az6qaEflMOy4ru8Nxzkb4GLh6s9R8LvM/9FqDKPY7vvNMzJ8N3/YXBmUm PnoJyxlMisNzwJkoSdYqIgLLD7/4CJaxkBnnMmrotvQxMKj7kiVSZ5Qj2 tu60kJZKU5jDA2irDDNHcHa+bSBCIByCE3Tl+yvqKXbZedIL1D9YQfsMZ ubKpNE1sbJJMy21B0jRMKL5ZMAKIuuBWg56+AVLLd2Vdb6Kg05pCz8/pb A==; X-IronPort-AV: E=McAfee;i="6600,9927,10998"; a="3495553" X-IronPort-AV: E=Sophos;i="6.06,191,1705392000"; d="scan'208";a="3495553" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2024 11:37:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,191,1705392000"; d="scan'208";a="7485398" Received: from agluck-desk3.sc.intel.com ([172.25.222.105]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2024 11:37:20 -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>, Drew Fustini <dfustini@baylibre.com>, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, patches@lists.linux.dev, Tony Luck <tony.luck@intel.com> Subject: [PATCH v15 5/8] x86/resctrl: Add node-scope to the options for feature scope Date: Wed, 28 Feb 2024 11:37:00 -0800 Message-ID: <20240228193717.8170-7-tony.luck@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240228112935.8087-tony.luck@intel.com> References: <20240228112215.8044-tony.luck@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792172786091561437 X-GMAIL-MSGID: 1792172786091561437 |
Series |
Add support for Sub-NUMA cluster (SNC) systems
|
|
Commit Message
Luck, Tony
Feb. 28, 2024, 7:37 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>
---
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 1a4ac60522bb..87b360e87215 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -176,6 +176,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 cd58c9d4710f..c34ce367c456 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -510,6 +510,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; }