Message ID | 20231013202602.2492645-5-babu.moger@amd.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp2136503vqb; Fri, 13 Oct 2023 13:27:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFtkVpixaTaBMJmV1Z9i9XUnkaQESv1rZUfau2g6nsQpYmRxBHX4i7oYGZg8gu4+wSrBvEh X-Received: by 2002:a17:902:dac8:b0:1bf:1a9e:85f7 with SMTP id q8-20020a170902dac800b001bf1a9e85f7mr31553844plx.1.1697228831407; Fri, 13 Oct 2023 13:27:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697228831; cv=pass; d=google.com; s=arc-20160816; b=04GEQfxgXF5HaUiI/EueKG0duGoFxsqfmC9tRbGXbLYquS5tSgEdqJU3n84X2XxznQ eeGVfjFPEwEtEFBvUnNNu7tja2SZjCmZInpSXB1yz2q4D+neO65nT6yTf9nEKSftmKrW DI+W5UeAKQJo0QtySCau+AKOMp9YKR5p2LtMNg+yKIC0f9hO+rx+LnLLi8G2EpVyvJjs pRhS+3kjmQGIf2EoU7m2gE/C6+MRrraZoDspWD1av3ZZ2BedGTwaovJtBnja6A5Kky5C sYbz4kqBHggsToeOnyfZHnYVdxjxc8TVKqWdrnyTQh6vh/yB6qTef99Me61pf7tqenqE g6Jg== ARC-Message-Signature: i=2; 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=W+cuwXqDoO6EAY1Xh2HSt3VpcRgwcwOk8iItpy7V0MI=; fh=a8QQDpsyeps30vd5Li+WI6v6dtcd7xKVvftia9bksQM=; b=lgP+4iUAt0SPjaT1oTaihvcNMVHIEGU/3DzZ7WSFzXR52MYpfJlaplSMYpK3hqgC92 cJpJwvglja5NKZa/8S0a0YzTXk3Q6GFoTJybD2kTDhvvf0AlJ9h1wBn6wm6PXufA1+Hu fjipG+ovmKtsrhcrTMWBs3A69jxJoSPF0u+1YVAgvgrrIn/Rln/BcqRkgwTtP9aUfSAt vpY9aB/e80QXNRiH3q6XrveeA26603QALesSYV0TqoQpebIdvCA+5LlJMtnvqGQE/FSf uwW/LTgSZvnnpa2KHdRKWaMuwSQF1cShuQhtRHjbkfN8L/G5HMnUP3K5V6fcVCjQgCpV M08w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=HTVIWoO0; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id h6-20020a170902748600b001c3e9170068si4852071pll.61.2023.10.13.13.27.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 13:27:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=HTVIWoO0; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 4F3DD822B71A; Fri, 13 Oct 2023 13:27:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232200AbjJMU03 (ORCPT <rfc822;rua109.linux@gmail.com> + 19 others); Fri, 13 Oct 2023 16:26:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231942AbjJMU0V (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 13 Oct 2023 16:26:21 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2082.outbound.protection.outlook.com [40.107.92.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E38883; Fri, 13 Oct 2023 13:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eCom/2oe2jO4XLcqsCEDy6PVP4bRr3HeaVa7cWSekZ1Eq1W+o6H0kItvsgIHVAPe5jOFnShqjJ/uvv0wAkSeCYroZRXyVlOJorP3Jm6GdlpjqQFsdcdcuCAmPZu1l4WRuzjZ8ZrA1RNTDdRbIGeaxgbqaMKmnHV38adqPbpvqNkAivbXb3TL9+S0n5kjXj3LP2AEjKEEQE840QuPa6jELNLMHzX+NRjKnil7xKKbJ6TkinC+9SHfwblMX0oGQVL/4B+nDv0fvMM4KUNlBxdyduliQkHTipcxU3YxxBe4EYftiy/fv6xQbnaYDntWTzshTq0M2hb0dfOVDfbPyet1rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=W+cuwXqDoO6EAY1Xh2HSt3VpcRgwcwOk8iItpy7V0MI=; b=WSKU3U8YNJ6zwpOGuRB8zLV/EbmAO70jRFdwpbBf98ETuVREHlp/2Iy1ncZMH00w1TQuUoc/d2ODUDor2xTXf/dY9BUcr9mPE7ppQoMzMym6bxOgOvyNZb1BWn2Sb8WbgHEesmT8U3mVTZQg2sIwVgFn6pV6GhmgMq+uJQgEV0DfKaRu/klEpzOMuMmbPs+ED2cbM+xwpkyCpHmepoNMcjrySWnEsLKPKhB0WUk6jX/dKrVLTav3hQF3ZP737Ce/GsnZVOKrERbThVVGBbhAr4dPSGp8K4dRXTtdJtDEw1GyRU9QBUi/ieuHKulDmciKdRSY3jw6OHBQQDTcjfyyaA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lwn.net smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W+cuwXqDoO6EAY1Xh2HSt3VpcRgwcwOk8iItpy7V0MI=; b=HTVIWoO0Qp5BK+ea5i2uIvclK81MTUpoEQEee3su6pNyo0DmxUe3JLJpVfAFFZsL7ZvrnHu0zsg7aMM1asknpYeQ2NaqbA2K9VizDzu/OocbB53H77NmbiejMW41bR9ewU1IhjF0RQxW3+AUbZqVAwFRCy9OOhDTWNkDpg2e5/0= Received: from DS7PR03CA0358.namprd03.prod.outlook.com (2603:10b6:8:55::7) by PH0PR12MB5500.namprd12.prod.outlook.com (2603:10b6:510:ef::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.44; Fri, 13 Oct 2023 20:26:17 +0000 Received: from DS1PEPF0001709A.namprd05.prod.outlook.com (2603:10b6:8:55:cafe::68) by DS7PR03CA0358.outlook.office365.com (2603:10b6:8:55::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.27 via Frontend Transport; Fri, 13 Oct 2023 20:26:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF0001709A.mail.protection.outlook.com (10.167.18.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.22 via Frontend Transport; Fri, 13 Oct 2023 20:26:17 +0000 Received: from bmoger-ubuntu.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 13 Oct 2023 15:26:15 -0500 From: Babu Moger <babu.moger@amd.com> To: <corbet@lwn.net>, <reinette.chatre@intel.com>, <tglx@linutronix.de>, <mingo@redhat.com>, <bp@alien8.de> CC: <fenghua.yu@intel.com>, <dave.hansen@linux.intel.com>, <x86@kernel.org>, <hpa@zytor.com>, <paulmck@kernel.org>, <akpm@linux-foundation.org>, <quic_neeraju@quicinc.com>, <rdunlap@infradead.org>, <damien.lemoal@opensource.wdc.com>, <songmuchun@bytedance.com>, <peterz@infradead.org>, <jpoimboe@kernel.org>, <pbonzini@redhat.com>, <babu.moger@amd.com>, <chang.seok.bae@intel.com>, <pawan.kumar.gupta@linux.intel.com>, <jmattson@google.com>, <daniel.sneddon@linux.intel.com>, <sandipan.das@amd.com>, <tony.luck@intel.com>, <james.morse@arm.com>, <linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <bagasdotme@gmail.com>, <eranian@google.com>, <christophe.leroy@csgroup.eu>, <jarkko@kernel.org>, <adrian.hunter@intel.com>, <quic_jiles@quicinc.com>, <peternewman@google.com> Subject: [PATCH v13 04/10] x86/resctrl: Add comments on RFTYPE flags hierarchy Date: Fri, 13 Oct 2023 15:25:56 -0500 Message-ID: <20231013202602.2492645-5-babu.moger@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231013202602.2492645-1-babu.moger@amd.com> References: <20231013202602.2492645-1-babu.moger@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0001709A:EE_|PH0PR12MB5500:EE_ X-MS-Office365-Filtering-Correlation-Id: 7983b7a7-44fc-4373-b2e6-08dbcc2aa772 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ceYtmxmh1aVJ1Whj95nYdhj6N5NGw+6QVjurNLpIM+P8W6aVLzoZumj0NHIphOF1gKDJEXFatF5LgrFjAeJub4Tw/rW9EG9MAcWnyrwsIJc8Sd3+rcFernZ4bIz9PRl42Jgjhy4dsdleeutRqBMl+5nhqw0FmVX6pyNKxP82qXFLBWEOEwu3sH8LeUpOUKHIpL2HhH3CFvwOgjLNtsOhR4K9uQSb1NNz/VUUXn0sTnnrTOyJfVdwZitjm+RWvRyZUZRMcIzvCDHxk17JYtgJITbfgR0YKfgcfrVaO8PvE2eCmH8T6Cg5vapEkvYCB222TMJXce/4kPmVHL+R7X1NdeaYaVe627ahxjq4TI7Gwb56mGHkCTcoQ3GOjYnZSWhGgnKuJhDhsnVShF6owxQGpj7AA3Vj4DKj09uYRIJUWmUbHsKGpGQPo9jGBq7L9HvYRavB2tBx9BwhIWoiCPdwhSjY16hDdr1GCEZrwZemh2IPzm81QuQVuxdSykpl08ZbqSy+VL77TfMcwVqQSF1TLi70LcWAW0cKGmWfaLGAejQarUeLRKPRrubkypJDovUxnvwrXgcStq7LBmYgBlZc3p0kjGWfKtzSi840j27v6W0vjmnQ0RicDSbSricZU09aQX8ghRSrY9suw1sYFxUACNEJ4Fp/fwAI1kUnBIc9VMjXCY+EjG3+yayMslUOnazN1rjBl/hBP5aH5cLbV8K470+wgScNuObGg6hDB6T/LnX8Ur5JqgLA2IWlljJvhtPkaBDBnUab0hlsax0blXjQDQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(346002)(396003)(376002)(136003)(39860400002)(230922051799003)(451199024)(186009)(82310400011)(64100799003)(1800799009)(40470700004)(36840700001)(46966006)(8936002)(82740400003)(36860700001)(2616005)(7696005)(6666004)(478600001)(86362001)(47076005)(336012)(426003)(110136005)(316002)(26005)(70206006)(70586007)(1076003)(16526019)(54906003)(8676002)(5660300002)(41300700001)(44832011)(7406005)(4326008)(7416002)(81166007)(40460700003)(2906002)(40480700001)(356005)(36756003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2023 20:26:17.2280 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7983b7a7-44fc-4373-b2e6-08dbcc2aa772 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0001709A.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5500 X-Spam-Status: No, score=-0.9 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Fri, 13 Oct 2023 13:27:05 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779673419194854336 X-GMAIL-MSGID: 1779673419194854336 |
Series |
x86/resctrl: Miscellaneous resctrl features
|
|
Commit Message
Moger, Babu
Oct. 13, 2023, 8:25 p.m. UTC
resctrl uses RFTYPE flags for creating resctrl directory structure.
Definitions and directory structures are not documented. Add
comments to improve the readability and help future additions.
Signed-off-by: Babu Moger <babu.moger@amd.com>
---
v13: Fixed the format issues in the documentation. Needed few minor format
changes to address the syntax issues.(Reinette)
Removed "Reviewed-by and Tested-by" flags as the patch has changed.
v12: Moved the comments from arch/x86/kernel/cpu/resctrl/internal.h
to Documentation/arch/x86/resctrl.rst. (Boris)
---
Documentation/arch/x86/resctrl.rst | 64 ++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
Comments
Hi Babu, On 10/13/2023 1:25 PM, Babu Moger wrote: > resctrl uses RFTYPE flags for creating resctrl directory structure. > > Definitions and directory structures are not documented. Add > comments to improve the readability and help future additions. > > Signed-off-by: Babu Moger <babu.moger@amd.com> > --- > v13: Fixed the format issues in the documentation. Needed few minor format > changes to address the syntax issues.(Reinette) > Removed "Reviewed-by and Tested-by" flags as the patch has changed. > > v12: Moved the comments from arch/x86/kernel/cpu/resctrl/internal.h > to Documentation/arch/x86/resctrl.rst. (Boris) > --- > Documentation/arch/x86/resctrl.rst | 64 ++++++++++++++++++++++++++++++ > 1 file changed, 64 insertions(+) > > diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst > index 178ab1d8f747..1163da74f734 100644 > --- a/Documentation/arch/x86/resctrl.rst > +++ b/Documentation/arch/x86/resctrl.rst > @@ -369,6 +369,70 @@ When monitoring is enabled all MON groups will also contain: > the sum for all tasks in the CTRL_MON group and all tasks in > MON groups. Please see example section for more details on usage. > > +RESCTRL filesystem implementation notes > +======================================= > +RESCTRL filesystem has two main components > + a. info > + b. base > + > + /sys/fs/resctrl/ > + | > + -> info > + | > + | (Top level directory named "info". Contains files that > + | provide details on control and monitoring resources") > + | > + -> base > + Could you please do a "make htmldocs" and then ensure that the output looks sane? The resulting output does not look right to me. For example, the above turns into a single line that looks like: /sys/fs/resctrl/ | -> info | | (Top level directory named "info". Contains files that | provide details on control and monitoring resources") | -> base The spacing also looks off when viewing this in html. > + (Root directory associated with default resource group as > + well as directories created by user for MON and CTRL groups. > + Contains files to interact with MON and CTRL groups) > + > + Note: resctrl uses flags for files, not for directories. > + Directories are created based on the resource type. Added > + directories below for better understanding. The RFTYPE flags > + are defined in arch/x86/kernel/cpu/resctrl/internal.h. > + > + info directory structure > + You removed the separator in order to pass the syntax issue but now there is no indication that this is a heading and the content becomes harder to understand. > + -> RFTYPE_INFO > + Directory: info > + > + -> RFTYPE_TOP (Files in top level of info directory) > + File: last_cmd_status > + > + -> RFTYPE_MON (Files for all monitoring resources) > + Directory: L3_MON > + Files: mon_features, num_rmids > + > + -> RFTYPE_RES_CACHE (Files for cache monitoring resources) > + Directory: L3_MON > + Files: max_threshold_occupancy, > + mbm_total_bytes_config, > + mbm_local_bytes_config > + > + -> RFTYPE_CTRL (Files for all control resources) > + Directories: L2, L3, MB, SMBA, L2CODE, L2DATA, L3CODE, L3DATA > + File: num_closids > + > + -> RFTYPE_RES_CACHE (Files for cache control resources) > + Directories: L2, L3, L2CODE, L2DATA, L3CODE, L3DATA > + Files: bit_usage, cbm_mask, min_cbm_bits, > + shareable_bits > + > + -> RFTYPE_RES_MB (Files for memory control resources) > + Directories: MB, SMBA > + Files: bandwidth_gran, delay_linear, > + min_bandwidth, thread_throttle_mode > + > + base directory structure > + Same here. > + -> RFTYPE_BASE (Files common for both MON and CTRL groups) > + Files: cpus, cpus_list, tasks > + > + -> RFTYPE_CTRL (Files for CTRL group) > + Files: mode, schemata, size > + > Resource allocation rules > ------------------------- > Reinette
Hi Reinette, On 10/13/2023 4:23 PM, Reinette Chatre wrote: > Hi Babu, > > On 10/13/2023 1:25 PM, Babu Moger wrote: >> resctrl uses RFTYPE flags for creating resctrl directory structure. >> >> Definitions and directory structures are not documented. Add >> comments to improve the readability and help future additions. >> >> Signed-off-by: Babu Moger <babu.moger@amd.com> >> --- >> v13: Fixed the format issues in the documentation. Needed few minor format >> changes to address the syntax issues.(Reinette) >> Removed "Reviewed-by and Tested-by" flags as the patch has changed. >> >> v12: Moved the comments from arch/x86/kernel/cpu/resctrl/internal.h >> to Documentation/arch/x86/resctrl.rst. (Boris) >> --- >> Documentation/arch/x86/resctrl.rst | 64 ++++++++++++++++++++++++++++++ >> 1 file changed, 64 insertions(+) >> >> diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst >> index 178ab1d8f747..1163da74f734 100644 >> --- a/Documentation/arch/x86/resctrl.rst >> +++ b/Documentation/arch/x86/resctrl.rst >> @@ -369,6 +369,70 @@ When monitoring is enabled all MON groups will also contain: >> the sum for all tasks in the CTRL_MON group and all tasks in >> MON groups. Please see example section for more details on usage. >> >> +RESCTRL filesystem implementation notes >> +======================================= >> +RESCTRL filesystem has two main components >> + a. info >> + b. base >> + >> + /sys/fs/resctrl/ >> + | >> + -> info >> + | >> + | (Top level directory named "info". Contains files that >> + | provide details on control and monitoring resources") >> + | >> + -> base >> + > Could you please do a "make htmldocs" and then ensure that the output looks sane? > The resulting output does not look right to me. For example, the above turns into > a single line that looks like: > > /sys/fs/resctrl/ | -> info | | (Top level directory named "info". Contains files that | provide details on control and monitoring resources") | -> base > > > The spacing also looks off when viewing this in html. Yes. Messed up again. Thought fixing the syntax was enough. Will look into this. > >> + (Root directory associated with default resource group as >> + well as directories created by user for MON and CTRL groups. >> + Contains files to interact with MON and CTRL groups) >> + >> + Note: resctrl uses flags for files, not for directories. >> + Directories are created based on the resource type. Added >> + directories below for better understanding. The RFTYPE flags >> + are defined in arch/x86/kernel/cpu/resctrl/internal.h. >> + >> + info directory structure >> + > You removed the separator in order to pass the syntax issue but now there is > no indication that this is a heading and the content becomes harder to understand. Yes. I played with this little bit. Dont know how to make this look as header. Will check it. > >> + -> RFTYPE_INFO >> + Directory: info >> + >> + -> RFTYPE_TOP (Files in top level of info directory) >> + File: last_cmd_status >> + >> + -> RFTYPE_MON (Files for all monitoring resources) >> + Directory: L3_MON >> + Files: mon_features, num_rmids >> + >> + -> RFTYPE_RES_CACHE (Files for cache monitoring resources) >> + Directory: L3_MON >> + Files: max_threshold_occupancy, >> + mbm_total_bytes_config, >> + mbm_local_bytes_config >> + >> + -> RFTYPE_CTRL (Files for all control resources) >> + Directories: L2, L3, MB, SMBA, L2CODE, L2DATA, L3CODE, L3DATA >> + File: num_closids >> + >> + -> RFTYPE_RES_CACHE (Files for cache control resources) >> + Directories: L2, L3, L2CODE, L2DATA, L3CODE, L3DATA >> + Files: bit_usage, cbm_mask, min_cbm_bits, >> + shareable_bits >> + >> + -> RFTYPE_RES_MB (Files for memory control resources) >> + Directories: MB, SMBA >> + Files: bandwidth_gran, delay_linear, >> + min_bandwidth, thread_throttle_mode >> + >> + base directory structure >> + > Same here. Yes. Will check it. thanks Babu
Hi Reinette, On 10/13/2023 4:39 PM, Moger, Babu wrote: > Hi Reinette, > > On 10/13/2023 4:23 PM, Reinette Chatre wrote: >> Hi Babu, >> >> On 10/13/2023 1:25 PM, Babu Moger wrote: >>> resctrl uses RFTYPE flags for creating resctrl directory structure. >>> >>> Definitions and directory structures are not documented. Add >>> comments to improve the readability and help future additions. >>> >>> Signed-off-by: Babu Moger <babu.moger@amd.com> >>> --- >>> v13: Fixed the format issues in the documentation. Needed few minor >>> format >>> changes to address the syntax issues.(Reinette) >>> Removed "Reviewed-by and Tested-by" flags as the patch has >>> changed. >>> >>> v12: Moved the comments from arch/x86/kernel/cpu/resctrl/internal.h >>> to Documentation/arch/x86/resctrl.rst. (Boris) >>> --- >>> Documentation/arch/x86/resctrl.rst | 64 >>> ++++++++++++++++++++++++++++++ >>> 1 file changed, 64 insertions(+) >>> >>> diff --git a/Documentation/arch/x86/resctrl.rst >>> b/Documentation/arch/x86/resctrl.rst >>> index 178ab1d8f747..1163da74f734 100644 >>> --- a/Documentation/arch/x86/resctrl.rst >>> +++ b/Documentation/arch/x86/resctrl.rst >>> @@ -369,6 +369,70 @@ When monitoring is enabled all MON groups will >>> also contain: >>> the sum for all tasks in the CTRL_MON group and all tasks in >>> MON groups. Please see example section for more details on usage. >>> +RESCTRL filesystem implementation notes >>> +======================================= >>> +RESCTRL filesystem has two main components >>> + a. info >>> + b. base >>> + >>> + /sys/fs/resctrl/ >>> + | >>> + -> info >>> + | >>> + | (Top level directory named "info". Contains files that >>> + | provide details on control and monitoring resources") >>> + | >>> + -> base >>> + >> Could you please do a "make htmldocs" and then ensure that the output >> looks sane? >> The resulting output does not look right to me. For example, the >> above turns into >> a single line that looks like: >> >> /sys/fs/resctrl/ | -> info | | (Top level directory named "info". >> Contains files that | provide details on control and monitoring >> resources") | -> base >> >> >> The spacing also looks off when viewing this in html. > I have fixed the all the format issues. Please let me know if it looks ok. I will send the final version after that. Attached the patch and also added the diff inline. Thanks diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst index 178ab1d8f747..e990272e9a4f 100644 --- a/Documentation/arch/x86/resctrl.rst +++ b/Documentation/arch/x86/resctrl.rst @@ -396,6 +396,67 @@ Resource monitoring rules 3) Otherwise RDT events for the task will be reported in the root level "mon_data" group. +RESCTRL filesystem implementation notes +--------------------------------------- +RESCTRL filesystem has two main components. + +a. info +b. base + +:: + + /sys/fs/resctrl/ + | + |--> info (Top level directory named "info". Contains files that + | provide details on control and monitoring resources") + | + |--> base (Root directory associated with default resource group as + well as directories created by user for MON and CTRL groups. + Contains files to interact with MON and CTRL groups) + + Note: resctrl uses flags for files, not for directories. Directories + are created based on the resource type. Added the directories + below for better understanding. The RFTYPE flags are defined + in arch/x86/kernel/cpu/resctrl/internal.h. + +"info directory structure":: + + --> RFTYPE_INFO + Directory: info + --> RFTYPE_TOP (Files in top level of info directory) + File: last_cmd_status + + --> RFTYPE_MON (Files for all monitoring resources) + Directory: L3_MON + Files: mon_features, num_rmids + + --> RFTYPE_RES_CACHE (Files for cache monitoring resources) + Directory: L3_MON + Files: max_threshold_occupancy, + mbm_total_bytes_config, + mbm_local_bytes_config + + --> RFTYPE_CTRL (Files for all control resources) + Directories: L2, L3, MB, SMBA, L2CODE, L2DATA, L3CODE, L3DATA + File: num_closids + + --> RFTYPE_RES_CACHE (Files for cache control resources) + Directories: L2, L3, L2CODE, L2DATA, L3CODE, L3DATA + Files: bit_usage, cbm_mask, min_cbm_bits, + shareable_bits + + --> RFTYPE_RES_MB (Files for memory control resources) + Directories: MB, SMBA + Files: bandwidth_gran, delay_linear, + min_bandwidth, thread_throttle_mode + +"base directory structure":: + + --> RFTYPE_BASE (Files common for both MON and CTRL groups) + Files: cpus, cpus_list, tasks + + --> RFTYPE_CTRL (Files for CTRL group) + Files: mode, schemata, size Notes on cache occupancy monitoring and control =============================================== commit 6fc3d73890386c18b69568444411ac9763391752 Author: Babu Moger <babu.moger@amd.com> Date: Fri Oct 13 10:45:13 2023 -0500 x86/resctrl: Add comments on RFTYPE flags hierarchy resctrl uses RFTYPE flags for creating resctrl directory structure. Definitions and directory structures are not documented. Add comments to improve the readability and help future additions. Signed-off-by: Babu Moger <babu.moger@amd.com> --- v13: Fixed the format issues in the documentation. Needed few minor format changes to address the syntax issues.(Reinette) Removed "Reviewed-by and Tested-by" flags as the patch has changed. v12: Moved the comments from arch/x86/kernel/cpu/resctrl/internal.h to Documentation/arch/x86/resctrl.rst. (Boris) diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst index 178ab1d8f747..e990272e9a4f 100644 --- a/Documentation/arch/x86/resctrl.rst +++ b/Documentation/arch/x86/resctrl.rst @@ -396,6 +396,67 @@ Resource monitoring rules 3) Otherwise RDT events for the task will be reported in the root level "mon_data" group. +RESCTRL filesystem implementation notes +--------------------------------------- +RESCTRL filesystem has two main components. + +a. info +b. base + +:: + + /sys/fs/resctrl/ + | + |--> info (Top level directory named "info". Contains files that + | provide details on control and monitoring resources") + | + |--> base (Root directory associated with default resource group as + well as directories created by user for MON and CTRL groups. + Contains files to interact with MON and CTRL groups) + + Note: resctrl uses flags for files, not for directories. Directories + are created based on the resource type. Added the directories + below for better understanding. The RFTYPE flags are defined + in arch/x86/kernel/cpu/resctrl/internal.h. + +"info directory structure":: + + --> RFTYPE_INFO + Directory: info + --> RFTYPE_TOP (Files in top level of info directory) + File: last_cmd_status + + --> RFTYPE_MON (Files for all monitoring resources) + Directory: L3_MON + Files: mon_features, num_rmids + + --> RFTYPE_RES_CACHE (Files for cache monitoring resources) + Directory: L3_MON + Files: max_threshold_occupancy, + mbm_total_bytes_config, + mbm_local_bytes_config + + --> RFTYPE_CTRL (Files for all control resources) + Directories: L2, L3, MB, SMBA, L2CODE, L2DATA, L3CODE, L3DATA + File: num_closids + + --> RFTYPE_RES_CACHE (Files for cache control resources) + Directories: L2, L3, L2CODE, L2DATA, L3CODE, L3DATA + Files: bit_usage, cbm_mask, min_cbm_bits, + shareable_bits + + --> RFTYPE_RES_MB (Files for memory control resources) + Directories: MB, SMBA + Files: bandwidth_gran, delay_linear, + min_bandwidth, thread_throttle_mode + +"base directory structure":: + + --> RFTYPE_BASE (Files common for both MON and CTRL groups) + Files: cpus, cpus_list, tasks + + --> RFTYPE_CTRL (Files for CTRL group) + Files: mode, schemata, size Notes on cache occupancy monitoring and control ===============================================
Hi Babu, On 10/14/2023 4:06 PM, Moger, Babu wrote: > On 10/13/2023 4:39 PM, Moger, Babu wrote: >> On 10/13/2023 4:23 PM, Reinette Chatre wrote: >>> On 10/13/2023 1:25 PM, Babu Moger wrote: >>>> resctrl uses RFTYPE flags for creating resctrl directory structure. >>>> >>>> Definitions and directory structures are not documented. Add >>>> comments to improve the readability and help future additions. >>>> >>>> Signed-off-by: Babu Moger <babu.moger@amd.com> >>>> --- >>>> v13: Fixed the format issues in the documentation. Needed few minor format >>>> changes to address the syntax issues.(Reinette) >>>> Removed "Reviewed-by and Tested-by" flags as the patch has changed. >>>> >>>> v12: Moved the comments from arch/x86/kernel/cpu/resctrl/internal.h >>>> to Documentation/arch/x86/resctrl.rst. (Boris) >>>> --- >>>> Documentation/arch/x86/resctrl.rst | 64 ++++++++++++++++++++++++++++++ >>>> 1 file changed, 64 insertions(+) >>>> >>>> diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst >>>> index 178ab1d8f747..1163da74f734 100644 >>>> --- a/Documentation/arch/x86/resctrl.rst >>>> +++ b/Documentation/arch/x86/resctrl.rst >>>> @@ -369,6 +369,70 @@ When monitoring is enabled all MON groups will also contain: >>>> the sum for all tasks in the CTRL_MON group and all tasks in >>>> MON groups. Please see example section for more details on usage. >>>> +RESCTRL filesystem implementation notes >>>> +======================================= >>>> +RESCTRL filesystem has two main components >>>> + a. info >>>> + b. base >>>> + >>>> + /sys/fs/resctrl/ >>>> + | >>>> + -> info >>>> + | >>>> + | (Top level directory named "info". Contains files that >>>> + | provide details on control and monitoring resources") >>>> + | >>>> + -> base >>>> + >>> Could you please do a "make htmldocs" and then ensure that the output looks sane? >>> The resulting output does not look right to me. For example, the above turns into >>> a single line that looks like: >>> >>> /sys/fs/resctrl/ | -> info | | (Top level directory named "info". Contains files that | provide details on control and monitoring resources") | -> base >>> >>> >>> The spacing also looks off when viewing this in html. >> > I have fixed the all the format issues. Please let me know if it > looks ok. I will send the final version after that. > > Attached the patch and also added the diff inline. This still does not look as though you consider how the document looks after the changes. Consider the organization. Before your changes (assume numbering starts at 1): 1. User Interface for Resource Control feature 1.1 Info directory 1.2 Resource alloc and monitor groups 1.2.1 Resource allocation rules 1.2.2 Resource monitoring rules 1.3 Notes on cache occupancy monitoring and control ... After your changes: 1. User Interface for Resource Control feature 1.1 Info directory 1.2 Resource alloc and monitor groups 1.2.1 Resource allocation rules 1.2.2 Resource monitoring rules 1.2.3 RESCTRL filesystem implementation notes 1.3 Notes on cache occupancy monitoring and control ... Note how the "RESCTRL filesystem implementation notes" is inserted as a subsection of resource and monitoring groups. Since the text describes all files in resctrl (not just resource groups) I expect that it would not be buried as a subsection of resource groups. This addition also ignores existing customs. Nowhere in the entire document will you find "RESCTRL" (well, except for the config option). > Thanks > > diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst > index 178ab1d8f747..e990272e9a4f 100644 > --- a/Documentation/arch/x86/resctrl.rst > +++ b/Documentation/arch/x86/resctrl.rst > @@ -396,6 +396,67 @@ Resource monitoring rules > 3) Otherwise RDT events for the task will be reported in the root level > "mon_data" group. > > +RESCTRL filesystem implementation notes > +--------------------------------------- > +RESCTRL filesystem has two main components. This documentation was extracted as-is from the header file where it was next to the flags being documented. With this move all that context is lost so it may be helpful to summarize what is documented here. > + > +a. info > +b. base > + > +:: If I understand correctly, instead of adjusting to the target format you hardcode all the text as pre-formatted? That may be ok. I cannot speak to whether this matches expectations of the proposal to move the documentation here. > + > + /sys/fs/resctrl/ > + | > + |--> info (Top level directory named "info". Contains files that > + | provide details on control and monitoring resources") > + | > + |--> base (Root directory associated with default resource group as > + well as directories created by user for MON and CTRL groups. > + Contains files to interact with MON and CTRL groups) > + > + Note: resctrl uses flags for files, not for directories. Directories > + are created based on the resource type. Added the directories > + below for better understanding. The RFTYPE flags are defined > + in arch/x86/kernel/cpu/resctrl/internal.h. > + > +"info directory structure":: > + This unexpected. In your previous response you noted that you did not know how to make it look like a header. I expected that you would read the manual to answer your own question but instead you just placed the title in quotes? I do not see how placing text in quotes create impression that it is a header. There is syntax to indicate section headers. Reinette
On Mon, Oct 16, 2023 at 01:46:42PM -0700, Reinette Chatre wrote: > This still does not look as though you consider how the document > looks after the changes. Looking how this would take longer, Babu, you could leave out the documentation changes for now and send the rest of the pile which has been reviewed. And then you can take your time and do the documentation stuff after that. HTH.
Hi Boris, On 10/16/2023 4:10 PM, Borislav Petkov wrote: > On Mon, Oct 16, 2023 at 01:46:42PM -0700, Reinette Chatre wrote: >> This still does not look as though you consider how the document >> looks after the changes. > Looking how this would take longer, Babu, you could leave out the > documentation changes for now and send the rest of the pile which has > been reviewed. > > And then you can take your time and do the documentation stuff after > that. Yes. Sure. Will send it ASAP. Thanks Babu
Hi Reinette, Boris pulled rest of the patches. Thank you very much for the feedback and patience. I can send this as a separate patch with all the FTYPE documentation update. This need go later. On 10/16/23 15:46, Reinette Chatre wrote: > Hi Babu, > > On 10/14/2023 4:06 PM, Moger, Babu wrote: >> On 10/13/2023 4:39 PM, Moger, Babu wrote: >>> On 10/13/2023 4:23 PM, Reinette Chatre wrote: >>>> On 10/13/2023 1:25 PM, Babu Moger wrote: >>>>> resctrl uses RFTYPE flags for creating resctrl directory structure. >>>>> >>>>> Definitions and directory structures are not documented. Add >>>>> comments to improve the readability and help future additions. >>>>> >>>>> Signed-off-by: Babu Moger <babu.moger@amd.com> >>>>> --- >>>>> v13: Fixed the format issues in the documentation. Needed few minor format >>>>> changes to address the syntax issues.(Reinette) >>>>> Removed "Reviewed-by and Tested-by" flags as the patch has changed. >>>>> >>>>> v12: Moved the comments from arch/x86/kernel/cpu/resctrl/internal.h >>>>> to Documentation/arch/x86/resctrl.rst. (Boris) >>>>> --- >>>>> Documentation/arch/x86/resctrl.rst | 64 ++++++++++++++++++++++++++++++ >>>>> 1 file changed, 64 insertions(+) >>>>> >>>>> diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst >>>>> index 178ab1d8f747..1163da74f734 100644 >>>>> --- a/Documentation/arch/x86/resctrl.rst >>>>> +++ b/Documentation/arch/x86/resctrl.rst >>>>> @@ -369,6 +369,70 @@ When monitoring is enabled all MON groups will also contain: >>>>> the sum for all tasks in the CTRL_MON group and all tasks in >>>>> MON groups. Please see example section for more details on usage. >>>>> +RESCTRL filesystem implementation notes >>>>> +======================================= >>>>> +RESCTRL filesystem has two main components >>>>> + a. info >>>>> + b. base >>>>> + >>>>> + /sys/fs/resctrl/ >>>>> + | >>>>> + -> info >>>>> + | >>>>> + | (Top level directory named "info". Contains files that >>>>> + | provide details on control and monitoring resources") >>>>> + | >>>>> + -> base >>>>> + >>>> Could you please do a "make htmldocs" and then ensure that the output looks sane? >>>> The resulting output does not look right to me. For example, the above turns into >>>> a single line that looks like: >>>> >>>> /sys/fs/resctrl/ | -> info | | (Top level directory named "info". Contains files that | provide details on control and monitoring resources") | -> base >>>> >>>> >>>> The spacing also looks off when viewing this in html. >>> >> I have fixed the all the format issues. Please let me know if it >> looks ok. I will send the final version after that. >> >> Attached the patch and also added the diff inline. > > This still does not look as though you consider how the document > looks after the changes. > > Consider the organization. Before your changes (assume numbering starts > at 1): > > 1. User Interface for Resource Control feature > 1.1 Info directory > 1.2 Resource alloc and monitor groups > 1.2.1 Resource allocation rules > 1.2.2 Resource monitoring rules > 1.3 Notes on cache occupancy monitoring and control > ... > > After your changes: > > 1. User Interface for Resource Control feature > 1.1 Info directory > 1.2 Resource alloc and monitor groups > 1.2.1 Resource allocation rules > 1.2.2 Resource monitoring rules > 1.2.3 RESCTRL filesystem implementation notes > 1.3 Notes on cache occupancy monitoring and control > ... > > Note how the "RESCTRL filesystem implementation notes" is inserted > as a subsection of resource and monitoring groups. Since the text > describes all files in resctrl (not just resource groups) I expect > that it would not be buried as a subsection of resource groups. we can make a separate sub chapter for this. Something like this. 1. User Interface for Resource Control feature 1.1 Info directory 1.2 Resource alloc and monitor groups 1.2.1 Resource allocation rules 1.2.2 Resource monitoring rules 1.3 RESCTRL filesystem implementation notes 1.3.1 info directory structure 1.3.2 base directory structure 1.3 Notes on cache occupancy monitoring and control > > This addition also ignores existing customs. Nowhere in the > entire document will you find "RESCTRL" (well, except for the > config option). Sure. We can change this to "resctrl" > >> Thanks >> >> diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst >> index 178ab1d8f747..e990272e9a4f 100644 >> --- a/Documentation/arch/x86/resctrl.rst >> +++ b/Documentation/arch/x86/resctrl.rst >> @@ -396,6 +396,67 @@ Resource monitoring rules >> 3) Otherwise RDT events for the task will be reported in the root level >> "mon_data" group. >> >> +RESCTRL filesystem implementation notes >> +--------------------------------------- >> +RESCTRL filesystem has two main components. > > This documentation was extracted as-is from the header file where it > was next to the flags being documented. With this move all that context > is lost so it may be helpful to summarize what is documented here. I can move the notes here with some modifications. > >> + >> +a. info >> +b. base >> + >> +:: > > If I understand correctly, instead of adjusting to the target format you > hardcode all the text as pre-formatted? That may be ok. I cannot speak to > whether this matches expectations of the proposal to move the documentation > here. I am not sure either. > >> + >> + /sys/fs/resctrl/ >> + | >> + |--> info (Top level directory named "info". Contains files that >> + | provide details on control and monitoring resources") >> + | >> + |--> base (Root directory associated with default resource group as >> + well as directories created by user for MON and CTRL groups. >> + Contains files to interact with MON and CTRL groups) >> + >> + Note: resctrl uses flags for files, not for directories. Directories >> + are created based on the resource type. Added the directories >> + below for better understanding. The RFTYPE flags are defined >> + in arch/x86/kernel/cpu/resctrl/internal.h. >> + >> +"info directory structure":: >> + > > This unexpected. In your previous response you noted that you did not know > how to make it look like a header. I expected that you would read the manual > to answer your own question but instead you just placed the title in quotes? I do > not see how placing text in quotes create impression that it is a header. > There is syntax to indicate section headers. Actually, i have kind of understood all the formatting details. Still learning though. Attached the patch.
Hi Babu, On 10/17/2023 10:47 AM, Moger, Babu wrote: > Hi Reinette, > > Boris pulled rest of the patches. Thank you very much for the feedback and > patience. > > I can send this as a separate patch with all the FTYPE documentation > update. This need go later. ok > > > On 10/16/23 15:46, Reinette Chatre wrote: >> Hi Babu, >> >> On 10/14/2023 4:06 PM, Moger, Babu wrote: >>> On 10/13/2023 4:39 PM, Moger, Babu wrote: >>>> On 10/13/2023 4:23 PM, Reinette Chatre wrote: >>>>> On 10/13/2023 1:25 PM, Babu Moger wrote: >>>>>> resctrl uses RFTYPE flags for creating resctrl directory structure. >>>>>> >>>>>> Definitions and directory structures are not documented. Add >>>>>> comments to improve the readability and help future additions. >>>>>> >>>>>> Signed-off-by: Babu Moger <babu.moger@amd.com> >>>>>> --- >>>>>> v13: Fixed the format issues in the documentation. Needed few minor format >>>>>> changes to address the syntax issues.(Reinette) >>>>>> Removed "Reviewed-by and Tested-by" flags as the patch has changed. >>>>>> >>>>>> v12: Moved the comments from arch/x86/kernel/cpu/resctrl/internal.h >>>>>> to Documentation/arch/x86/resctrl.rst. (Boris) >>>>>> --- >>>>>> Documentation/arch/x86/resctrl.rst | 64 ++++++++++++++++++++++++++++++ >>>>>> 1 file changed, 64 insertions(+) >>>>>> >>>>>> diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst >>>>>> index 178ab1d8f747..1163da74f734 100644 >>>>>> --- a/Documentation/arch/x86/resctrl.rst >>>>>> +++ b/Documentation/arch/x86/resctrl.rst >>>>>> @@ -369,6 +369,70 @@ When monitoring is enabled all MON groups will also contain: >>>>>> the sum for all tasks in the CTRL_MON group and all tasks in >>>>>> MON groups. Please see example section for more details on usage. >>>>>> +RESCTRL filesystem implementation notes >>>>>> +======================================= >>>>>> +RESCTRL filesystem has two main components >>>>>> + a. info >>>>>> + b. base >>>>>> + >>>>>> + /sys/fs/resctrl/ >>>>>> + | >>>>>> + -> info >>>>>> + | >>>>>> + | (Top level directory named "info". Contains files that >>>>>> + | provide details on control and monitoring resources") >>>>>> + | >>>>>> + -> base >>>>>> + >>>>> Could you please do a "make htmldocs" and then ensure that the output looks sane? >>>>> The resulting output does not look right to me. For example, the above turns into >>>>> a single line that looks like: >>>>> >>>>> /sys/fs/resctrl/ | -> info | | (Top level directory named "info". Contains files that | provide details on control and monitoring resources") | -> base >>>>> >>>>> >>>>> The spacing also looks off when viewing this in html. >>>> >>> I have fixed the all the format issues. Please let me know if it >>> looks ok. I will send the final version after that. >>> >>> Attached the patch and also added the diff inline. >> >> This still does not look as though you consider how the document >> looks after the changes. >> >> Consider the organization. Before your changes (assume numbering starts >> at 1): >> >> 1. User Interface for Resource Control feature >> 1.1 Info directory >> 1.2 Resource alloc and monitor groups >> 1.2.1 Resource allocation rules >> 1.2.2 Resource monitoring rules >> 1.3 Notes on cache occupancy monitoring and control >> ... >> >> After your changes: >> >> 1. User Interface for Resource Control feature >> 1.1 Info directory >> 1.2 Resource alloc and monitor groups >> 1.2.1 Resource allocation rules >> 1.2.2 Resource monitoring rules >> 1.2.3 RESCTRL filesystem implementation notes >> 1.3 Notes on cache occupancy monitoring and control >> ... >> >> Note how the "RESCTRL filesystem implementation notes" is inserted >> as a subsection of resource and monitoring groups. Since the text >> describes all files in resctrl (not just resource groups) I expect >> that it would not be buried as a subsection of resource groups. > > we can make a separate sub chapter for this. Something like this. > > 1. User Interface for Resource Control feature > 1.1 Info directory > 1.2 Resource alloc and monitor groups > 1.2.1 Resource allocation rules > 1.2.2 Resource monitoring rules > 1.3 RESCTRL filesystem implementation notes > 1.3.1 info directory structure > 1.3.2 base directory structure > 1.3 Notes on cache occupancy monitoring and control ok. Since this is the first addition of any implementation notes it does set a precedent. In this case it implies that implementation notes would accompany the feature being described as opposed to all implementation notes being placed together. I am not aware of customs in this regard but having consistent text, like "implementation notes" that a developer can search for is useful. >> >> This addition also ignores existing customs. Nowhere in the >> entire document will you find "RESCTRL" (well, except for the >> config option). > > Sure. We can change this to "resctrl" Thank you. > >> >>> Thanks >>> >>> diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst >>> index 178ab1d8f747..e990272e9a4f 100644 >>> --- a/Documentation/arch/x86/resctrl.rst >>> +++ b/Documentation/arch/x86/resctrl.rst >>> @@ -396,6 +396,67 @@ Resource monitoring rules >>> 3) Otherwise RDT events for the task will be reported in the root level >>> "mon_data" group. >>> >>> +RESCTRL filesystem implementation notes >>> +--------------------------------------- >>> +RESCTRL filesystem has two main components. >> >> This documentation was extracted as-is from the header file where it >> was next to the flags being documented. With this move all that context >> is lost so it may be helpful to summarize what is documented here. > > I can move the notes here with some modifications. > >> >>> + >>> +a. info >>> +b. base >>> + >>> +:: >> >> If I understand correctly, instead of adjusting to the target format you >> hardcode all the text as pre-formatted? That may be ok. I cannot speak to >> whether this matches expectations of the proposal to move the documentation >> here. > > I am not sure either. > It seems that since this you decided to stop using pre-formatted text for some of the text but not all? >> >>> + >>> + /sys/fs/resctrl/ >>> + | >>> + |--> info (Top level directory named "info". Contains files that >>> + | provide details on control and monitoring resources") >>> + | >>> + |--> base (Root directory associated with default resource group as >>> + well as directories created by user for MON and CTRL groups. >>> + Contains files to interact with MON and CTRL groups) >>> + >>> + Note: resctrl uses flags for files, not for directories. Directories >>> + are created based on the resource type. Added the directories >>> + below for better understanding. The RFTYPE flags are defined >>> + in arch/x86/kernel/cpu/resctrl/internal.h. >>> + >>> +"info directory structure":: >>> + >> >> This unexpected. In your previous response you noted that you did not know >> how to make it look like a header. I expected that you would read the manual >> to answer your own question but instead you just placed the title in quotes? I do >> not see how placing text in quotes create impression that it is a header. >> There is syntax to indicate section headers. > > Actually, i have kind of understood all the formatting details. Still > learning though. Attached the patch. In the version I responded to you could have underlined the text with "~" to turn it into a subsection of appropriate level. For reference: https://docutils.sourceforge.io/docs/user/rst/quickstart.html It is inconvenient to work with an attached patch. Please send patches inline. > Subject: [PATCH] x86/resctrl: Add comments on RFTYPE flags hierarchy > > resctrl uses RFTYPE flags for creating resctrl directory structure. > > Definitions and directory structures are not documented. Add > comments to improve the readability and help future additions. > Commit message needs to be reworked considering that it is now documentation and not just comments added to a header file. > Signed-off-by: Babu Moger <babu.moger@amd.com> > --- > Documentation/arch/x86/resctrl.rst | 73 ++++++++++++++++++++++++++++++ > 1 file changed, 73 insertions(+) > > diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst > index a6279df64a9d..c89a926934fe 100644 > --- a/Documentation/arch/x86/resctrl.rst > +++ b/Documentation/arch/x86/resctrl.rst > @@ -407,6 +407,79 @@ Resource monitoring rules > 3) Otherwise RDT events for the task will be reported in the root level > "mon_data" group. > > +resctrl filesystem implementation notes > +======================================= > + > +This section lists the files and directories under resctrl filesystem to > +understand filesystem hierarchy. resctrl module uses RFTYPE flags defined > +in arch/x86/kernel/cpu/resctrl/internal.h to create files. Directories are > +created based on the resource type. First sentence can be dropped. It is not clear how it relates to what this section describes. Also, there is no resctrl module, so "resctrl module" -> "resctrl". Code moves around, especially nowadays in resctrl. Noting the flags are enough for a developer to find them, no need to name the header file. So just: resctrl uses RFTYPE flags to create files. Directories are created based on the resource type. > + > +resctrl filesystem has two main components. "components." -> "components:" ? > + > +1) info > +2) base > + > +:: > + The "::" above means that the text below is pre-formatted. Thus, all that was needed was to copy the text from what you had in v11 to the new document. I do not understand how so many issues could have slipped in while doing so (see below). > + /sys/fs/resctrl/ > + | > + |--> info (Top level directory named "info". Contains files that > + | provide details on control and monitoring resources") monitoring resources" -> monitoring resources. ? Also note that the alignment is different between the two sections. Can the text be aligned to the parenthesis as before to match what is done below? > + | > + --> base (Root directory associated with default resource group as > + well as directories created by user for MON and CTRL groups. > + Contains files to interact with MON and CTRL groups) > + This is different from what you had before and it now appears as though base is at a different level from info. Also, sentence needs to end with a period. The text above is pre-formatted ... > +info directory structure > +------------------------ > + ... but the text below is no longer pre-formatted ? Why is this inconsistent? I assumed from previous exchange that you switched to pre-formatted to not have to deal with inconsistent spacing when using the same text in a reStructuredText doc ... but now you are back to using the same text with the inconsistent spacing. > + --> RFTYPE_INFO > + Directory: info > + --> RFTYPE_TOP (Files in top level of info directory) > + File: last_cmd_status > + > + --> RFTYPE_MON (Files for all monitoring resources) > + Directory: L3_MON > + Files: mon_features, num_rmids > + > + --> RFTYPE_RES_CACHE (Files for cache monitoring resources) > + Directory: L3_MON > + Files: max_threshold_occupancy, > + mbm_total_bytes_config, > + mbm_local_bytes_config > + > + --> RFTYPE_CTRL (Files for all control resources) > + Directories: L2, L3, MB, SMBA, L2CODE, L2DATA, L3CODE, L3DATA > + File: num_closids > + > + --> RFTYPE_RES_CACHE (Files for cache control resources) > + Directories: L2, L3, L2CODE, L2DATA, L3CODE, L3DATA > + Files: bit_usage, cbm_mask, min_cbm_bits, > + shareable_bits > + > + --> RFTYPE_RES_MB (Files for memory control resources) > + Directories: MB, SMBA > + Files: bandwidth_gran, delay_linear, > + min_bandwidth, thread_throttle_mode > + > +base directory structure > +-------------------------- > + I am not familiar enough with the syntax to know if the underlining needs to be precise. As above, the text below is no longer pre-formatted? This brings some unexpected views when I try to look at it in the generated html ... > + --> RFTYPE_BASE (Files common for both MON and CTRL groups) > + Files: cpus, cpus_list, tasks > + > + --> RFTYPE_MON (Files for MON group) > + > + --> RFTYPE_DEBUG (Files to help resctrl debugging) > + File: mon_hw_id > + > + --> RFTYPE_CTRL (Files for CTRL group) > + Files: mode, schemata, size > + For some reason the above snippet appears different when attempting a html view. The "-->" uses a different character and the "Files" line is next to the flag line, not below. Could you please run "make htmldocs" and confirm that the generated file looks sane? > + -> RFTYPE_DEBUG (Files to help resctrl debugging) > + File: ctrl_hw_id > + > > Notes on cache occupancy monitoring and control > =============================================== > -- Reinette
diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst index 178ab1d8f747..1163da74f734 100644 --- a/Documentation/arch/x86/resctrl.rst +++ b/Documentation/arch/x86/resctrl.rst @@ -369,6 +369,70 @@ When monitoring is enabled all MON groups will also contain: the sum for all tasks in the CTRL_MON group and all tasks in MON groups. Please see example section for more details on usage. +RESCTRL filesystem implementation notes +======================================= +RESCTRL filesystem has two main components + a. info + b. base + + /sys/fs/resctrl/ + | + -> info + | + | (Top level directory named "info". Contains files that + | provide details on control and monitoring resources") + | + -> base + + (Root directory associated with default resource group as + well as directories created by user for MON and CTRL groups. + Contains files to interact with MON and CTRL groups) + + Note: resctrl uses flags for files, not for directories. + Directories are created based on the resource type. Added + directories below for better understanding. The RFTYPE flags + are defined in arch/x86/kernel/cpu/resctrl/internal.h. + + info directory structure + + -> RFTYPE_INFO + Directory: info + + -> RFTYPE_TOP (Files in top level of info directory) + File: last_cmd_status + + -> RFTYPE_MON (Files for all monitoring resources) + Directory: L3_MON + Files: mon_features, num_rmids + + -> RFTYPE_RES_CACHE (Files for cache monitoring resources) + Directory: L3_MON + Files: max_threshold_occupancy, + mbm_total_bytes_config, + mbm_local_bytes_config + + -> RFTYPE_CTRL (Files for all control resources) + Directories: L2, L3, MB, SMBA, L2CODE, L2DATA, L3CODE, L3DATA + File: num_closids + + -> RFTYPE_RES_CACHE (Files for cache control resources) + Directories: L2, L3, L2CODE, L2DATA, L3CODE, L3DATA + Files: bit_usage, cbm_mask, min_cbm_bits, + shareable_bits + + -> RFTYPE_RES_MB (Files for memory control resources) + Directories: MB, SMBA + Files: bandwidth_gran, delay_linear, + min_bandwidth, thread_throttle_mode + + base directory structure + + -> RFTYPE_BASE (Files common for both MON and CTRL groups) + Files: cpus, cpus_list, tasks + + -> RFTYPE_CTRL (Files for CTRL group) + Files: mode, schemata, size + Resource allocation rules -------------------------