Message ID | 20231109230915.73600-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:b129:0:b0:403:3b70:6f57 with SMTP id q9csp763633vqs; Thu, 9 Nov 2023 15:10:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IHoRxnAiNsZME7BsFaXm+sjIFlsHU9Xd9otLjJR5jvwHe3KIN2olj4tW9FGah56GvjxFRlX X-Received: by 2002:a05:6e02:1e0d:b0:359:582c:c96b with SMTP id g13-20020a056e021e0d00b00359582cc96bmr8335723ila.25.1699571404111; Thu, 09 Nov 2023 15:10:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699571404; cv=none; d=google.com; s=arc-20160816; b=f0FoQPSd0stE/NoJjpsw2cjyzkOz9ikPdDFH1343Pfma7a7BlmE2eS7uSClI1skNX+ N9YmVTFcrqTYzcBjPg7Lr0FfI3CKlydN4hbStgG4bYyVkAmfoBZpZeVXPZyT6kN1TUkZ iuFYshC8aswXZ1WPdxcdbWAh6gbSYZe9/7GcyQGPwfDYXoLRJocvorJtYizUjhrYY6B2 t1qqjM9fdPxcmI9cw8xRd3iu4r3bYuSaXkzU0TR5kNkiobzAssFF3/M8HWYfMPDJDeST uv3OHldzBHQ6R9kd4+miKXeSreEdzyCTnPhU7AEQ2E9pYoFNT6FzWocyP+Hhwi2TZ2wX NHbA== 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=Yeeb1EyVPLu8/Bp7Q0MWKgDyKHJJiQPwjly1XbxqA9o=; fh=EIH9XAmicvPIUSP7TBeBhZ/WaoqG49JQ3xV1i3Gl7Co=; b=ilyfbq/lCqJQ+WshsbyKWgAfGl3+2QHJ/ztJB/K4rFe8RNZfv6ZgrSIDlSBkyBcit2 65S5EM7Sl/g/eybAtcpm8dabte2yGouB90p/nS1Ja3z6GkouNE3TA8eIfL25grGJgdfW lzE5z4p77v9hBhWWFXJqI0aCWdYGrBLInYAcX2O4875adf3m1o/Vtq4RzTMukHOofh6x qLH3ColCLZnG4qxd6l7FovGBt2jQgAdlprJVi1IyX4A4ntYo3IgPSvKZEa8uaGpGVUUJ NZpkaOJeWMpTVDtKwRJfKCFX5ZpBImC9a5umaUA4x8rbC5x4XDBtt6heasEHTbNZYUHE dOcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Sg6W8Ot3; 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 x4-20020a63db44000000b005be24bc1b81si421780pgi.835.2023.11.09.15.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 15:10:04 -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=Sg6W8Ot3; 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 0969083A3125; Thu, 9 Nov 2023 15:10:03 -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 S1345414AbjKIXJw (ORCPT <rfc822;lhua1029@gmail.com> + 31 others); Thu, 9 Nov 2023 18:09:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345362AbjKIXJh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 9 Nov 2023 18:09:37 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC0BA449E; Thu, 9 Nov 2023 15:09:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699571374; x=1731107374; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EBKoTAhO7i9aqmllGkQFUqLANqH0yhQbjIfC4/Fqjaw=; b=Sg6W8Ot3muek1jQw0yYd1/yLMQjQJHuY+TWnjuhgXAd7chNS2hkyuHTt RWqF8GVNDxFrNhIrfLKofHYwbui/zPmFsJtwuj5N8XN8NgE7nqqWK1aZs EEvNTF+uwtwzni5DbcHxk/XGUjwHahpKv2NJqZw/wJ4NzjfiTTK1uAPbM VK7DHBSjs16DtxtZO1rVGtM8VrRIGkYl0zMwlySIBM6r6gR0oo7PBiSzP co/4CQXHvQXiROFiizYKXZFzUkQlAAhcgCaZIwywiBMaa/n5Pan8C0Er8 A+TZ/wBe0Z8jRlNBK6EPom18nUtiGjzpYWqZF2ypm3NBCCYDTwJkMwTy4 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10889"; a="370298146" X-IronPort-AV: E=Sophos;i="6.03,290,1694761200"; d="scan'208";a="370298146" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2023 15:09:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10889"; a="833984571" X-IronPort-AV: E=Sophos;i="6.03,290,1694761200"; d="scan'208";a="833984571" Received: from agluck-desk3.sc.intel.com ([172.25.222.74]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2023 15:09:32 -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> Subject: [PATCH v11 5/8] x86/resctrl: Add node-scope to the options for feature scope Date: Thu, 9 Nov 2023 15:09:12 -0800 Message-ID: <20231109230915.73600-6-tony.luck@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231109230915.73600-1-tony.luck@intel.com> References: <20231031211708.37390-1-tony.luck@intel.com> <20231109230915.73600-1-tony.luck@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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]); Thu, 09 Nov 2023 15:10:03 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778054133068408317 X-GMAIL-MSGID: 1782129784519882104 |
Series |
Add support for Sub-NUMA cluster (SNC) systems
|
|
Commit Message
Luck, Tony
Nov. 9, 2023, 11:09 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> --- include/linux/resctrl.h | 1 + arch/x86/kernel/cpu/resctrl/core.c | 2 ++ 2 files changed, 3 insertions(+)
Comments
Hi Tony, On 11/9/2023 3:09 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. > > Reviewed-by: Peter Newman <peternewman@google.com> > Signed-off-by: Tony Luck <tony.luck@intel.com> > --- Please follow guidance in section "Ordering of commit tags" from Documentation/process/maintainer-tip.rst With that addressed (thus adding Reviewed-by tags after your author SOB): Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Reinette
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 cee8b87566fa..0f2b5ee429b0 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; }