From nobody Mon Feb 9 22:19:01 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2D1CC0015E for ; Wed, 19 Jul 2023 23:22:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230061AbjGSXWR (ORCPT ); Wed, 19 Jul 2023 19:22:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230341AbjGSXWN (ORCPT ); Wed, 19 Jul 2023 19:22:13 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2057.outbound.protection.outlook.com [40.107.220.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EEAD2123; Wed, 19 Jul 2023 16:22:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZY7Xc5bLQiS+lSBnCtR21Y+qpo+r2yyVTh7rKtxsMn8HapYX8CejZTmp6qGit+MUHVDfXLMJ9Epefl6B2iNSseGwvHTFvYTprTMj4IGpEEnLJuirMGgM+0kuZ+wtoABoT361EdF/mGaTSZUNokssn5OueEK9RBawUXnVtAfJO/NkGWqVci9vdP+P/3Onxv7YVqbUdBn5j0Z7DPRvADYvJ42L7qNJqVAvzenxuFAl6poGitK1xa/CVwS2Gk+BSZMCLU1JWMEZrjY1G6ruj7xom93/bwQ8wrL0CytKdeoBIz//H/d/JUJbfzA7d2fSAqsdAvMn+92hKwDTFtdlT1RToQ== 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=sb12peGDFs/wQKrqWuRnsyseXFMg7ZiqzMWBfgnQtXw=; b=kMzmQzL1VUjgFfsadZ6EDJUwgCRHY85lfc7NbsxYTux7JypaD+77kL2EG0UgXRrgxAkWAc3LCnm6GWCkJiISMkM6f2tIY4VlFtkNLJ4zHUnUwIXgXZSYg1mq4KPDZPhAjlDr2IImD02o1WpxZGNqeL/ATWqrv4j/OxU2DwQqFA8v3NZK0q+R1IN1GCUOkmPwKcFK5HvzNpyvaIVIVeChPEze1SUW/CD28To5CuKhvqEwmSP5Vqn40HjFImpaTff965T2HJ8rbxAcme7tkWDG7UjTaheffdk6//HrDJ1ZKilznQvD3JU+8FSGpFtlE9EQ3Z2xNw6bYWVbXZV/BOgJNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org 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=sb12peGDFs/wQKrqWuRnsyseXFMg7ZiqzMWBfgnQtXw=; b=1RWuwZ5oH040weJW5dpTLmoO5XJcIW5cUT5yJRIege4KHSamHKyNgdPfjx1kYm58xGxL8ng8GuQjDd19wvsEOnejceqSSuRLJqne3Rc570YyNQ8gpUpXkSzfDZLSZnVG/+HJpwR0ZREyqq5kjsP1g+2AW647ZTPb1CahvZJCWzs= Received: from DS7PR05CA0107.namprd05.prod.outlook.com (2603:10b6:8:56::25) by DS0PR12MB6487.namprd12.prod.outlook.com (2603:10b6:8:c4::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.31; Wed, 19 Jul 2023 23:21:58 +0000 Received: from DM6NAM11FT064.eop-nam11.prod.protection.outlook.com (2603:10b6:8:56:cafe::c5) by DS7PR05CA0107.outlook.office365.com (2603:10b6:8:56::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.24 via Frontend Transport; Wed, 19 Jul 2023 23:21:58 +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 DM6NAM11FT064.mail.protection.outlook.com (10.13.172.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6588.34 via Frontend Transport; Wed, 19 Jul 2023 23:21:58 +0000 Received: from [127.0.1.1] (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.23; Wed, 19 Jul 2023 18:21:56 -0500 Subject: [PATCH v6 4/8] x86/resctrl: Add comments on RFTYPE flags hierarchy From: Babu Moger To: , , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Date: Wed, 19 Jul 2023 18:21:55 -0500 Message-ID: <168980891501.1619861.11056885467637617879.stgit@bmoger-ubuntu> In-Reply-To: <168980872063.1619861.420806535295905172.stgit@bmoger-ubuntu> References: <168980872063.1619861.420806535295905172.stgit@bmoger-ubuntu> User-Agent: StGit/1.1.dev103+g5369f4c MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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: DM6NAM11FT064:EE_|DS0PR12MB6487:EE_ X-MS-Office365-Filtering-Correlation-Id: fb15e83a-b1c1-4c00-3f71-08db88aef318 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: flZ1IBDDmBEY+p+kjZGitUdeMLtoRBvda7xQYFgZ03Ax5eWX9cPthPuvTPc1F4bggEiQQFamXgIHdvIv+j1g0Xm1OEveVG+SEn9IccHqO5B/uHTlAwAfPxEdu+bYfPTCftiOpVeCWGBBvWyG+BBYxvuUkpVktbC3GdYa+eLTHsO6zmw6Nd9G+DJ0LaqNUFRNahhHi0P3j4pqBl1PzZ32QFP02/u7I7b2RtjRvgN6IrIcYKwXBlPd11eStT/x0blXPNbm35PutETKhGs47toCMsip2Yrvae78Gu9NleMtsw3cE/eDQZQuYxWmNUueSjKDk1qYoPzBVwGol2ywDlMHDYb0EJR0c2jy62DSR8KLU8ThfHSPOdBadbPXxmHjsgMqcVOHnAjx5fPhF7gKq4AGzQs8ARIGrvLaN+gTLr9Uu4PXlJxAgT0FrtH2Wm4G2BgxZuMamxEIcNWjA1wuAbtUTeVqgeaMPLvJxRMupa4+3f/KOdVBUrBWtqCbD5uZX8tD8ntPjFanvp7WxNQIC7XqdiBfbqq4r+AT02nGvVICtj0r5nEF4q+bJAep6dTGhvri2dHRYjKAzkUfRqAsiCXy7deUQxAjtGHq0Rg5UeqJoPuPih3rQ8FrtuerxZBzYMjrOL7tR5Gud8EfixX+QkbswKIUM9ODsAfE005t8y+mI0xHDkeUCHfTnHl5F296B5F2XEyjoqqgXzAjHpYQ+fVTPT+YRTcTGKDi08EAgOAVDvKUrS81Lmq7zbE5Pu0wIxhUwCmGFX0f3vzpfSFSKXsQfAKz+dOxp0TAl+l6ypC7qcY= 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:(13230028)(4636009)(7916004)(396003)(346002)(39860400002)(376002)(136003)(82310400008)(451199021)(40470700004)(36840700001)(46966006)(33716001)(2906002)(478600001)(54906003)(7416002)(44832011)(7406005)(40460700003)(316002)(16576012)(8676002)(70206006)(41300700001)(70586007)(4326008)(110136005)(336012)(47076005)(86362001)(81166007)(36860700001)(8936002)(426003)(82740400003)(356005)(9686003)(5660300002)(103116003)(16526019)(186003)(26005)(40480700001)(71626016)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2023 23:21:58.6415 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fb15e83a-b1c1-4c00-3f71-08db88aef318 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: DM6NAM11FT064.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6487 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/x86/kernel/cpu/resctrl/internal.h | 48 ++++++++++++++++++++++++++++= ++++ 1 file changed, 48 insertions(+) diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/r= esctrl/internal.h index 2051179a3b91..783c3e36633c 100644 --- a/arch/x86/kernel/cpu/resctrl/internal.h +++ b/arch/x86/kernel/cpu/resctrl/internal.h @@ -240,6 +240,54 @@ struct rdtgroup { =20 /* * Define the file type flags for base and info directories. + * + * 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.) + * + * info directory structure + * ------------------------------------------------------------------ + * --> RFTYPE_INFO + * --> directory + * --> RFTYPE_TOP_INFO + * Files: last_cmd_status + * + * --> RFTYPE_MON_INFO + * --> directory + * Files: max_threshold_occupancy, mon_features, + * num_rmids, mbm_total_bytes_config, + * mbm_locat_bytes_config + * + * --> RFTYPE_CTRL_INFO + * --> RFTYPE_RES_CACHE + * --> directory + * Files: bit_usage, cbm_mask, min_cbm_bits, + * num_closids, shareable_bits + * + * --> RFTYPE_RES_MB + * --> directory + * Files: bandwidth_gran, delay_linear, + * min_bandwidth, num_closids, + * thread_throttle_mode + * + * base (root) directory structure + * ------------------------------------------------------------------ + * --> RFTYPE_BASE (Files common for both MON and CTRL groups) + * Files: cpus, cpus_list, tasks + * + * --> RFTYPE_CTRL_BASE (Files only for CTRL group) + * Files: mode, schemata, size + * */ #define RFTYPE_INFO BIT(0) #define RFTYPE_BASE BIT(1)