Message ID | 20231003213043.13565-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:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2363494vqb; Tue, 3 Oct 2023 14:31:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGrILIySDqJXE61H0wgtHZhmdAgcp69FyyMWbuEMBk+AztmZEFXXU9Hdq8JzHbm5rlIxBXL X-Received: by 2002:a05:6a21:3e07:b0:161:5ea5:fc0b with SMTP id bk7-20020a056a213e0700b001615ea5fc0bmr593693pzc.16.1696368708443; Tue, 03 Oct 2023 14:31:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696368708; cv=none; d=google.com; s=arc-20160816; b=V6i5CSwx6+o6axba0fJQRGkgiibScmBFGjqC+gi97iqZpXaHepCErZ7v2kxV7L7DYx zxI0F6Y9UtMf1b0HDrU2DzYY88F07nOS+sk3WBWv1QKTLcXDgjWbEySULfnPkuaiNhzC y9Yh048ZUvY3t9qXzxRkECx1GarAs4nV8LSXE3piVwKYuM9aaHn0WrSkImDsh84f6unC M0RvK7H2KI6lmWLf9OQxt0ZaMrGrBgO8k5bzN3xdrE+pfmf/+9R7TVV83PBNHHma3lbi MnqFXvC7WZkFRW1QTk/JcPWmjKZ6LfMogKe3lHE6GdOqIRfdVLr1oem5rbcD3os3nopJ CktA== 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=hN3z81eVKalGiLh8dA74iqGBBqn5hA9uhFh2nI8PLWI=; fh=EIH9XAmicvPIUSP7TBeBhZ/WaoqG49JQ3xV1i3Gl7Co=; b=yVJlFzrCa8kJSiCRNJTGcLv5dKxWfVzPRcZ8AOy+/F2IcU7XUMQ+p0xeVPDpS6lFyL ip9pWqaLJhrZTFojzRPm9RYaCZ5kBZ32oVnRhe3Ek9z7xnJ7gYGLPGCWHbHA988l/F2W BwA8gosucyNAsECvRg1HPCrw1wOr8gz5Hg4KpGF14nzuOANpbn1bn0nwbguZAaZpGspI MUJtDR/bQk4wjufcM7riHNyqRZx+6O1xlK+yBbaBrQu+5owiRdRnJCfeTC3mDEwrqC1L 4Ej//g0WazGTuw374NgvdC1b5ngaZddrgAJNHQW43kUZ6IjwnyQ26SVun1BhtuNt1icB KewA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EZQRCvqp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id bt6-20020a056a00438600b0069100d1fc37si2367197pfb.49.2023.10.03.14.31.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 14:31:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EZQRCvqp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id C9780801B3D2; Tue, 3 Oct 2023 14:31:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241276AbjJCVbJ (ORCPT <rfc822;chrisfriedt@gmail.com> + 17 others); Tue, 3 Oct 2023 17:31:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241240AbjJCVa7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 3 Oct 2023 17:30:59 -0400 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFB1AAF; Tue, 3 Oct 2023 14:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696368657; x=1727904657; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JSM8VdI0f+hGPj3fp9HIjpyV6ZFG5pNcdINSGJ8Jp+o=; b=EZQRCvqpXGzi548A8W8/WRc6hVdlv8ZnyG3cHDWuAqyo4MG7y458oBcO 1oToHy9oQs1dmjjHaRkAd6r4/B7pC5MwwrXmGPZ+llTr/MhBGxzlfvBIJ Mm79tOtqmK7DzgYLYwOymYfiIGsC+hXjI031we1qp4ZXPdBA0Z39f96qB JdU/Lsp/BXxRjJLB9L21QD7zsde9Xpr+u2IwH/Kz0BR8T61sxMC6r+DuG NH5b8+zsQa99CtvVDZohBiOLh4mlWBgCs3P+OsReKqmgYZTIa4PV2LSuN qi/iz99YtqslNNovV46uXfCcopKpoCz8HvVK9kSkrqGyt3aV0DXjQOdnS g==; X-IronPort-AV: E=McAfee;i="6600,9927,10852"; a="1580430" X-IronPort-AV: E=Sophos;i="6.03,198,1694761200"; d="scan'208";a="1580430" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 14:30:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10852"; a="924801992" X-IronPort-AV: E=Sophos;i="6.03,198,1694761200"; d="scan'208";a="924801992" Received: from agluck-desk3.sc.intel.com ([172.25.222.74]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 14:30:51 -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 v8 5/8] x86/resctrl: Add node-scope to the options for feature scope Date: Tue, 3 Oct 2023 14:30:40 -0700 Message-ID: <20231003213043.13565-6-tony.luck@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231003213043.13565-1-tony.luck@intel.com> References: <20230928191350.205703-1-tony.luck@intel.com> <20231003213043.13565-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 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 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 14:31:25 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778054133068408317 X-GMAIL-MSGID: 1778771514744347094 |
Series |
Add support for Sub-NUMA cluster (SNC) systems
|
|
Commit Message
Luck, Tony
Oct. 3, 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. Signed-off-by: Tony Luck <tony.luck@intel.com> Reviewed-by: Peter Newman <peternewman@google.com> --- No changes since last version ---
diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h index 56fa04cedb50..15b98ac91272 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 d92fdce4e44f..6b937da36e4c 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -511,6 +511,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; }