From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from LO3P265CU004.outbound.protection.outlook.com (mail-uksouthazon11020108.outbound.protection.outlook.com [52.101.196.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7235E3314D7 for ; Tue, 10 Feb 2026 21:07:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.196.108 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770757647; cv=fail; b=ls/mgEPsuRD6WnO62WRxPPLe8ea769F8DGqANiofwGSuk8hkaK6zhMkTw+DcNsH7Boa4YYbcRX/IsAv3me4thDwxG6yuQ2HSFsGpo/P89mNlMAIb+in2jWnnwVa4+LZfJo2WyknBSKKlXeYXhF0zbNHKfHVcIcGjkV3J9O1YPeo= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770757647; c=relaxed/simple; bh=zcdAYUZ3NENO8ZqPBWvGTuuVfIAnIYx9wxOWK67GlDU=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=IaEH3CgSjyGAfJNynkbeJYy9FkrLfjEBxNd7VS+ZKnYtxN6db6jFKQT1rCPgAFmAsCLmwhflTlKJeGplU+trr/mx08VY8AAX8VrnDlrEU6A9HJKQw0i1Dn9oIf0lfpzhqY8//fo1Evp2qzBgk5G00K8QUlmYnruIWKTRZFGmfEk= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=atomlin.com; spf=pass smtp.mailfrom=atomlin.com; arc=fail smtp.client-ip=52.101.196.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=atomlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=atomlin.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rMlIzr27k1VmtMaClPjc1/6qZ7ip2whXUXnkYsRe3LJIGHSOgumOzJwEjeeLykJ1kkKpyRG30ZDKTsbq/bFMwMZGRW26URFs6syJRFp3fjw0ONN+Px0vxUdfBDrDS1DdtYO/7Jr6WfiGTT84NHazjPJlsXihWtGGbel64ci5XmtmkINL5mDx4JmN2dwGuHKo5+duPQQ3AQOqD3Dl/ZxI0eAtQHAgIAUNYq+cXv+CrdFP2dstJ30STpMGENzvEsjmJtTp/0/sdLA2Ub2j2CkHkCgsmFnT6YJe8hFuEkIQzyUbZ4TsYsTTDh855gNf27zMlrcb9UCQAZ1T6/jlSyqGAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=YYkkz4JHY4fohzXj02LW6NVCpdBHRLTQaL0FCyU0Vm8=; b=wnIrf6KECfHj/o66br/h4lIvdPrQPbDmsCP7+G/zfcqNgpvT/yfwdlbDzSGynF2Rh/SevB19XaES0SjqbHh6I72SFRigFEedO+pzlzcGlYtokdbJwfsFQyba7uLeZMVJXa6543r+kGRxLLVbFW2fMto4YPOmQKGvMmbszPq4Lhk4fTmY5S7NYV+nlxpvgz9dyFUo3n4wewtVdDObvKDxSwkP/k+0FzPQvPGEPPUIfyQSTPACoifHJ/2SHR/pnGqZknpPqaYLV5cpSB/I9S2qQSW2A/DW0UrNk2tQOZbX9ajsOStL6wvza2KJ/d5rXBkEMruWIrMB9IWiNvSDPO4+NA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=atomlin.com; dmarc=pass action=none header.from=atomlin.com; dkim=pass header.d=atomlin.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=atomlin.com; Received: from CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM (2603:10a6:400:70::10) by CWLP123MB6528.GBRP123.PROD.OUTLOOK.COM (2603:10a6:400:186::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9611.8; Tue, 10 Feb 2026 21:07:22 +0000 Received: from CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM ([fe80::de8e:2e4f:6c6:f3bf]) by CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM ([fe80::de8e:2e4f:6c6:f3bf%2]) with mapi id 15.20.9587.013; Tue, 10 Feb 2026 21:07:22 +0000 From: Aaron Tomlin To: tony.luck@intel.com, reinette.chatre@intel.com, Dave.Martin@arm.com, james.morse@arm.com, babu.moger@amd.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com Cc: dave.martin@arm.com, sean@ashe.io, neelx@suse.com, mproche@gmail.com, chjohnst@gmail.com, linux-kernel@vger.kernel.org Subject: [PATCH v5 0/2] fs/resctrl: Add "*" shorthand to set io_alloc CBM for all domains Date: Tue, 10 Feb 2026 16:07:15 -0500 Message-ID: <20260210210717.3866344-1-atomlin@atomlin.com> X-Mailer: git-send-email 2.51.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BL1PR13CA0005.namprd13.prod.outlook.com (2603:10b6:208:256::10) To CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM (2603:10a6:400:70::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CWLP123MB3523:EE_|CWLP123MB6528:EE_ X-MS-Office365-Filtering-Correlation-Id: a2749522-9ba0-4e5b-cbb6-08de68e861a9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|7416014|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?5pPDX0fepAjp0yhVdiHPDmf4Jsc0/a8IP73ARhwhbomUBBskMv532AgDK3Fn?= =?us-ascii?Q?6l+PAevrj+hm3xrkTxbCS8QdA8HhW+ydf2GRfhYuP7HHpYg5yanNO8ihP4IA?= =?us-ascii?Q?raXM9TUVK+swbZZUblIyiAdEBF4dxZfKSF/Hp/2HtXk83w6RiAoybOjZur2t?= =?us-ascii?Q?X74kh+LlAI2WT/WSQmbwLgUzlXJk+yVqECKCktHoVz2uR8VsfRSMjAWVdRQ+?= =?us-ascii?Q?d9DUQhVhEaZGrLhUpatEAEmr+y6IirsDMqzVPl65c/NYFQj4iksMqo/9rf0L?= =?us-ascii?Q?ycqWWNiWgN2wxsWjUdicpwr12gjVOQ8275RyRaSCcTk+LoDQoma1bXtwi9uu?= =?us-ascii?Q?2u7fxL5UXEiAuJ/mw7nO3YGhsYfd1lYzNcqkjOeXGO4h2ZVslwFh9gUzWRto?= =?us-ascii?Q?S/P3Wnc/+nuT0uFLM9Ls2+5536CEO0cWFyKWjeUJy6Yl1ojZOiUrghtCanVJ?= =?us-ascii?Q?OdNl8oWPdLHW5ONPkq4QcdwxcINHA6HVntQqszjrIsEXooLyyJcGvFrThQX3?= =?us-ascii?Q?0h830et3oFi0OkhN9J+lZz0nnjp/IE1ukG13iLdAe8P4peiae8eA/jV8Jhzd?= =?us-ascii?Q?6qyXyAtc9t+JJnyFX+BuftGwsITp42WDt/TEabXRSAXajVg2h1nBMpwXBU5S?= =?us-ascii?Q?1Afxn6FtCQd6qWAqF1MOM+/syoj/gqleHnwV8KrbDXOLX/AgmURX+7VA9H4X?= =?us-ascii?Q?4G51QrdeuK3R1Loc1BTKOvGpzS6uX9UKkcqjRIx3wyxwePjgG+4TYfteQ5vS?= =?us-ascii?Q?eCcrMfxk4Es3M6NeSWrxBS9HrTEScA1ONg+3AHgl3bt9lWXiAPaDHPavMYk4?= =?us-ascii?Q?w84vgayEyY0Ba6XIZqcV16oomyPiIQSeUakARl7FeMYFSwCTiSCrAY/1AL1k?= =?us-ascii?Q?hx3Pr3gUoeykB5F0HWZYK2nmu9feSft7ojAwQLdIY+XiTqJxbaPsoubBi4D1?= =?us-ascii?Q?SJ5LjVJXzRjWvpx6QoIQ98FezQOSy/TXPgJ0ZZnr1dT9zscPsyuYiUmvnb4r?= =?us-ascii?Q?wXf8RV+FE9UYZeoy5z1JK3gdaHAngFF89/lfVwq4sVQMb41f+0WuVPQYXaWB?= =?us-ascii?Q?Uvm78gO/HJnS35JPiZnKStAxw/WoJnqXJ9zjkrrWpotyq/lrSDrwiWNRMIG/?= =?us-ascii?Q?vn0K2syaDv4EX/l7MEObvx2ip+7vHB46jmmyZ+TXhSorZsq4swzxYhw357lS?= =?us-ascii?Q?wlFuTFHTGmUxmnPDSi2SKOPu5qyW9f/Pua9bz8Q0CUeBYDJ4JRHArnEMafT3?= =?us-ascii?Q?mIfvq8QAX5EkbOB8OFCwTKN/OQv+8DFLTAOX6tghob1JgAjZ/FJVzXOSdUA0?= =?us-ascii?Q?tY18EKGSm9Vka8QXbfMNT7weN+EP/Zjh++RH6zolYekClg8lOupCFcBTays2?= =?us-ascii?Q?NW2tEBNIjXiKU8Xy9qTzqa4ahtoBcfnSIpHJzbtsp5xIWhUalnGjYWHnzYiP?= =?us-ascii?Q?NnBVVeRhcBoUg8S+dhNSVc8IIoRqTtyIuWJUmInJ0tL3MS10EbXDlAsZgWrR?= =?us-ascii?Q?FdNYeZ1OvRPApG14/QUOKCqOJ4erE6pJINzU83K8bf/blWqzS1Hj3GIAYR9d?= =?us-ascii?Q?d1bWV8E5wy3G4daaqg4=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(1800799024)(376014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-M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nnq+pC6+LULM5U4S5UMXcTwFM9crU2DlA2bQDUx?= =?us-ascii?Q?72RXtbGeZg=3D=3D?= X-OriginatorOrg: atomlin.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2749522-9ba0-4e5b-cbb6-08de68e861a9 X-MS-Exchange-CrossTenant-AuthSource: CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2026 21:07:21.8449 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e6a32402-7d7b-4830-9a2b-76945bbbcb57 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XPouo1bnoAgVo9Zwb+FJdQbej4Pj0PCjVntrYml+SCGiPEm7xIB7mT0Hw/ydgJnp8GOJ1FpSB/zIMDon5Qvh8A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CWLP123MB6528 Hi Babu, Tony, Reinette, This series addresses two limitations in the fs/resctrl io_alloc interface: inconsistent error reporting and the lack of a mechanism for bulk configuration. The last_cmd_status file is intended to report details about the most recent filesystem operation to aid in diagnosing failures. Currently, however, when parsing io_alloc_cbm, providing an invalid domain ID causes the operation to fail with -EINVAL without updating last_cmd_status. This results in confusing behaviour where the system call fails, but the status file may misleadingly report "ok" (retained from a previous successful operation). Patch 1 addresses this by updating resctrl_io_alloc_parse_line() to explicitly write an error message to last_cmd_status when the target domain ID cannot be found. Configuring the io_alloc_cbm interface currently requires an explicit domain ID for each cache domain. On systems with high core counts and numerous cache clusters, this requirement becomes cumbersome for automation tasks that aim to apply a uniform policy across the system. Patch 2 introduces a wildcard domain ID selector "*". This enables users to programme the Capacity Bitmask (CBM) across all cache domains in a single operation (e.g., writing "*=0" to apply a mask to all domains), provided the value remains within the valid range defined by the resource. Please let me know your thoughts. Changes since v4 [1]: - Split the submission into a two-patch series to separate the fix from the new feature (Reinette Chatre) - Refactored resctrl_io_alloc_parse_line() to prioritise the dom check before string comparison, preventing potential NULL pointer dereference (Reinette Chatre) - Restructured commit messages to strictly follow the "Context, Problem, Solution" format (Reinette Chatre) - Updated the documentation to include the result of the modification (Babu Moger) - Updated the commit description to avoid implying that '0' is a universal minimum CBM (Reinette Chatre) Changes since v3 [2]: - Updated the wildcard documentation text to be clearer and less prescriptive (Reinette Chatre) - Reverted the while loop refactoring in resctrl_io_alloc_parse_line() to restore the standard parsing pattern and prevent invalid domain ID regressions (Reinette Chatre) - Added explicit validation to ensure the wildcard selector is followed by a value assignment (Reinette Chatre) - Restored memcpy() usage for configuration copying to minimise unrelated diff noise Changes since v2 [2]: - Dropped return -EINVAL for a missing seq_show implementation (Reinette Chatre) - Dropped helpers to check io_alloc support and enabled state (Reinette Chatre) - Removed additional complexity (Babu Moger) - Introduced the "*" wildcard for io_alloc_cbm to allow updating all cache domains (Reinette Chatre) - Replaced goto-based line parsing with a while loop to support multi-domain and wildcard iterations - Replaced memcpy() with direct structure assignment Changes since v1 [3]: - Updated each helper for consistency (Babu Moger) - Refactored the loop logic in function resctrl_io_alloc_parse_line() to improve readability - Added inline keyword to each helper - Added inline keyword to function parse_domain_cbm() [1]: https://lore.kernel.org/lkml/20260125171752.3374930-1-atomlin@atomlin.com/ [2]: https://lore.kernel.org/lkml/20251231023549.2390630-1-atomlin@atomlin.com/ [3]: https://lore.kernel.org/lkml/20251215230257.1798865-1-atomlin@atomlin.com/ [4]: https://lore.kernel.org/lkml/20251126171653.1004321-1-atomlin@atomlin.com/ Aaron Tomlin (2): fs/resctrl: Report invalid domain ID when parsing io_alloc fs/resctrl: Add "*" shorthand to set io_alloc CBM for all domains Documentation/filesystems/resctrl.rst | 10 ++++++++++ fs/resctrl/ctrlmondata.c | 16 +++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) -- 2.51.0