From patchwork Thu Jan 26 18:41:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luck, Tony" X-Patchwork-Id: 48851 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp429319wrn; Thu, 26 Jan 2023 10:45:41 -0800 (PST) X-Google-Smtp-Source: AK7set9xF6Z3dqeWdLZmKtEAanXBhQb8R+HC0BbJ1gzVzWFEN56ZN385FuMURRQCpTfgcwnh6f9G X-Received: by 2002:a62:828b:0:b0:590:70e0:c6a9 with SMTP id w133-20020a62828b000000b0059070e0c6a9mr5377754pfd.32.1674758741035; Thu, 26 Jan 2023 10:45:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674758741; cv=none; d=google.com; s=arc-20160816; b=z/33GEMMkkYf8CfMK7V09y7D9P0LZKpmCMClWMM5bb/fSPUB3xGSLTWB2P8+dt71na 7E29QI7knDA2L5US+w65vqiRr+AdrlR41Qm5gw/zGd6n7ZBt2qtJeqivt/IdhwKp5bcF eKMs9aVptouO8C7QLj1WoiPPRj+HcNYcAnGxNkvL3We62wh8+muuw9ujMFxPZdxx1ng7 df5zN8qFMWy6bR3sPz+9q5hv9ufHAz0hs9tIBql1o8Cqt37d9mDEdWDEfa4p37SvGjgQ cUaxsbDwiuiJ89e+5FL6nwq2F5g93hEqj4V/S2PpLUG96P2WzBLr84YQ1LhhGXhfB0kb ZmUw== 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=Q6NhNsTvlM//tugqpphfQShKc4dorBvHNARXEmxq1Ho=; b=dm0O40ZUeuHnQSD7jJWMSg/mpX4nwmyDqQAgF+9A7WI2NdaGoXN9hiU/5fMLFkT+wV 3gGA+WOouFXw4oCFgdiI5DPfh7SuvV+au9yA1YnOt3PvmGBEYYhpU0TxmlY88CzbP8pC qGdWMVaE/K2/U8h8CdzGUSyUUURLfxJFgOLAJUUIzFe33B5vyKs4qhuq8MYtCx++q9Hq eFWlX4C7p3wkmpAEKXOCekHi3fcctUXZESuOHRLY9gxEsGgIses42K6U5/StJPMaCUoJ NC5dFDg5Yf7+qvvjfKyou3CNlXVQFNvimYDfa0Z88YBk4SUJa/33kYdIljtKgOtNVWk2 hlkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YZr0bbBf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e14-20020aa7824e000000b0056ea2b1b0fesi1790083pfn.119.2023.01.26.10.45.29; Thu, 26 Jan 2023 10:45:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YZr0bbBf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232237AbjAZSmt (ORCPT + 99 others); Thu, 26 Jan 2023 13:42:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231513AbjAZSmd (ORCPT ); Thu, 26 Jan 2023 13:42:33 -0500 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F314474C7; Thu, 26 Jan 2023 10:42:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674758553; x=1706294553; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lazqj33+wcKOHpjgmXNXHNJZww2MNyt2EHBaLJXRYCw=; b=YZr0bbBfahBUfu/3SAMOQ6hI6BwMxQ8CQFasPDZ5HwLV8kesrv8s24Hl 0WtUe9oo8GJn8+c+IALbhD/LlfL/SU3gSzPTB5qofKctBLWJTrqFrUo5O ShanDrlviRiTEOeOGS5wHs2QY8SGYhwixZvyGox93/YAIQOSZJCJHH3wM 6od47+f5NrPNwX9WRpbqQrmPETE+U01LzrqGmGjNSnxIknaDJ4HNj07kX Majv+Ly4+zHupenxDshgdJYVAUU1db7mBqhns5iPiMUy8Hn4ii9X7/4H9 kygaLFTiKrRg32zbGrA3E4+K1P7LDjFoY0bwfxQ9t/LqnVDxSkRWnGg3k g==; X-IronPort-AV: E=McAfee;i="6500,9779,10602"; a="354203361" X-IronPort-AV: E=Sophos;i="5.97,249,1669104000"; d="scan'208";a="354203361" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2023 10:42:06 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10602"; a="991745452" X-IronPort-AV: E=Sophos;i="5.97,249,1669104000"; d="scan'208";a="991745452" Received: from agluck-desk3.sc.intel.com ([172.25.222.78]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2023 10:42:06 -0800 From: Tony Luck To: Fenghua Yu , Reinette Chatre , Peter Newman , Jonathan Corbet , x86@kernel.org Cc: Shaopeng Tan , James Morse , Jamie Iles , Babu Moger , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH 5/7] x86/resctrl: Add a new "snc_ways" file to the monitoring info directory. Date: Thu, 26 Jan 2023 10:41:55 -0800 Message-Id: <20230126184157.27626-6-tony.luck@intel.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230126184157.27626-1-tony.luck@intel.com> References: <20230126184157.27626-1-tony.luck@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756111821664181037?= X-GMAIL-MSGID: =?utf-8?q?1756111821664181037?= Make it easy for the user to tell if Sub-NUMA Cluster is enabled by providing an info/ file. Signed-off-by: Tony Luck --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c index a0dc64a70d01..392e7a08d083 100644 --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c @@ -997,6 +997,14 @@ static int rdt_num_rmids_show(struct kernfs_open_file *of, return 0; } +static int rdt_snc_ways_show(struct kernfs_open_file *of, + struct seq_file *seq, void *v) +{ + seq_printf(seq, "%d\n", snc_ways); + + return 0; +} + static int rdt_mon_features_show(struct kernfs_open_file *of, struct seq_file *seq, void *v) { @@ -1451,6 +1459,13 @@ static struct rftype res_common_files[] = { .seq_show = rdt_num_rmids_show, .fflags = RF_MON_INFO, }, + { + .name = "snc_ways", + .mode = 0444, + .kf_ops = &rdtgroup_kf_single_ops, + .seq_show = rdt_snc_ways_show, + .fflags = RF_MON_INFO, + }, { .name = "cbm_mask", .mode = 0444,