From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from SN4PR2101CU001.outbound.protection.outlook.com (mail-southcentralusazon11012026.outbound.protection.outlook.com [40.93.195.26]) (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 7327F30E84F for ; Thu, 16 Jul 2026 21:03:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.195.26 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784235818; cv=fail; b=VWcB6eMgwMPypV+9iKejzTtLLktA2NTyPOoMbRcaScgO7JuLuxW7VW9QrILaMpmBwEQ/EH8xUa00tbHF0hG9INmHDa/ozZmLevI/0yt4zIzWphSgUyON994OtF2anYBmJ2fL8XAPXxlFPQ1qjT+D23YMXGOIkSz2eU/Kcv0ztO8= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784235818; c=relaxed/simple; bh=JNmt+xvNRVypD+MPXV08hZTe2Z8Do5duSaitjDM01JA=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=kh/P2+5DIUgbzBzgtEwK0N3TPdrcB7XB04DqBtobuLByZUP71ptEnCM13aULNPK8xmvqnGWAUxyJ4mp7GOtdGL+0cHcofAM/NVUUpnla4OyaDITAHKnN3jji+ySWgmhsfX6rnPnORvFAJkwusNHYWQDlCF3Wb/ouRnCQYdPAr0E= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=qtMp1N+u; arc=fail smtp.client-ip=40.93.195.26 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="qtMp1N+u" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qeU77Gq0lQ8P0zBK2shh3b0l/N1k6LH4dXy1I2Gl5w+63ISY7lNSBqmdqiYyLusf5VD31EnI1YjdRVNmc27J6EbTXRJpmd5OlhHxg1FXy1bZNZ18eH5PxJ81rzImMP890jj2lcmYzScRrGIYDRygXHPLA2NYHK8Grhy0hI6IkmLCtmwXuyDdgiA/1YuEZSkCT/wdl2HNQraTrIiUf+3FTmzDwTliaQIE3Q4gB6rC5wmXVao+/rLZjm/th71ZdCKcrl9eomkYg8hc0k4Dn/lpjnc+WCMN5KGrb5fGkgAkykP/REq1MWioizRZsAyjIHSQMT2T03CJj03rXDJH+xoSnA== 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=8IECno4ly1gARzLcwnWJ+vVS4W65edIQKQ8d88JrbIw=; b=CgBaMwi2QMQsJK/FGPMAKBNJvi5mbfdC4w4aOSXaagVELQ0T/saXHz/Y2AS48dxnudWfIiTRayKxgewaAYFIesZQpqGLSYVNq/NnzqVqHMsl8ykYPWNKKOTK3nHX/Tncs2s5MIkvU+6wqUBGSCUsvhDvNibewPdhMYoqedeDSIikNlCfvYJ+ejVZFatNz1W1TLKBCJdn7/qdTt8e4trVjUlxngpckcbHPnZyrxul9v283XBuqo99+5ZstRoprcoLuHhQ/ZINM5++UwMhqsM8BcJGclsCUvG02OIUf7tQlpPgOxqt8T8+YNUrY8H5N7d2qrJ/YtzI94mAJXRUPReKnQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8IECno4ly1gARzLcwnWJ+vVS4W65edIQKQ8d88JrbIw=; b=qtMp1N+uAlxJJVFStAYeRPsnoUuzavrkB3m6aBP3cmNIT5C5abJyls9h8nPZP8qlCjclsrVAuAAaxcumvvxp9J0O6CI+eXULQHBMGL7Mle5uaRCGG4eQtpECld08CXdYDYPsafEVBEg/G+ruxzk4GX2QJRnf2GylWLVP2eP6U3eykL8MloaseYou6Dltmj7XggrYsR6sebQahwSkER4JY1HFKvkQ6d9jmChtXzgtTs4VTMrou0VrDcPTXa9+oh1VxWSBmTbetWr1v2GLyEUBnJsiLnLk1DPj2yG8k5dd6Lh6dVuuhz5Vd0cMVrdKf2CAe7sF06g8VhJSncT0P33YbA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from DM4PR12MB5230.namprd12.prod.outlook.com (2603:10b6:5:399::11) by PH0PR12MB7485.namprd12.prod.outlook.com (2603:10b6:510:1e9::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.223.12; Thu, 16 Jul 2026 21:03:30 +0000 Received: from DM4PR12MB5230.namprd12.prod.outlook.com ([fe80::6e87:1bde:1853:3b73]) by DM4PR12MB5230.namprd12.prod.outlook.com ([fe80::6e87:1bde:1853:3b73%5]) with mapi id 15.21.0223.011; Thu, 16 Jul 2026 21:03:29 +0000 From: Fenghua Yu To: Reinette Chatre , Tony Luck , Ben Horgan , James Morse , Dave Martin , Shaopeng Tan , Chen Yu , Babu Moger , Drew Fustini , Vikram Sethi , Shanker Donthineni , Newton Liu , Gavin Shan Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fenghua Yu Subject: [PATCH RFC 00/23] resctrl: MBA control emulation and ARM MPAM MB_NODE support Date: Thu, 16 Jul 2026 14:02:50 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SJ0PR03CA0178.namprd03.prod.outlook.com (2603:10b6:a03:338::33) To DM4PR12MB5230.namprd12.prod.outlook.com (2603:10b6:5:399::11) 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: DM4PR12MB5230:EE_|PH0PR12MB7485:EE_ X-MS-Office365-Filtering-Correlation-Id: 02f047cc-4d0e-4af5-cee7-08dee37dafe2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|366016|7416014|376014|1800799024|921020|18002099003|56012099006|11063799006|10067099003|3023799007|6133799003; X-Microsoft-Antispam-Message-Info: J0v9cA3YaLy/GTNauOXLjmk0LfUWJBaRBEaniIHhbWHJdq/WCCpjQvVaPFx05VZFxq+2BJfJbZV94xm5OK837VzKvEz0SvGWyDdqUV+lPNPSUY4W3F7hWm4Ns2dslVYKw7UFzUh7GvboCqIEZDg/0bPYN+q73VskhaBfBieCXm42hRKa9RT5Q5tp9x5oqxcmw9GvbIE63LA3MxK4/9b1fx9GofJ2DxwZbe6UH9acRleWKCAsZxK3lZp6XH+O/nNnjEuu0831MldYJ8SuPeqGEtWH/+7XX/vW9fvxsfDJTsQbbjVConIcVuY9rtSSAUuY/f+GKhR+Q7h+AukNG5s0U5zd+GDqV/kflNC/gNnQQr2LXH3TBGZ9CSWjKpduQfrEYwdVWqV9XOnMI9ilt4jYKb6BUUcGs3AbcCmvkU0Ogwra0Ih9ShyjzIJeHTwkHBKRTwbw8lApi03hYeWGhpp6QdvIgossIaa/CjxU+r/mEcSjxD+Zo8HaKxumg8xeueZFCG7YLp2BWH5utg4Uai+sgOb0Qa5SXTkZaZakz7nj+qYFsws5xEXMBJ21DgwMRAGnK6maIWZsXOAONsBlvuhDUcNScf6aoAOdtgPCEOXAcWYvF6jts239lNK862EfVJgM//7aXSPtQ8EfXxsSRk9wXk3b4YpFMs6timHS9ohw1sCXlbdwOslJmJ/VhsZmMdd+JL/PqVIqRDX1saMvQFhpRw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB5230.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(23010399003)(366016)(7416014)(376014)(1800799024)(921020)(18002099003)(56012099006)(11063799006)(10067099003)(3023799007)(6133799003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WjFBa0FjS1BYc0lEaXlDaWFFOUJ6cE5MSmQxMTVxcFdsRVFIUlFmM0dnbHF6?= =?utf-8?B?bGdWUUNPMVhHMW5NV0ppSFhlamlkczRIck1SSzZpOGp4M1Y2UjBDVk5DK29F?= =?utf-8?B?cEw5Z1pLYWc2TS8rQVZvL2RGYUV0eXNFREFHOHViWjVrazhwZEFORGhpamhJ?= =?utf-8?B?ZGtLbExYMWlVbzdyRi9tbHlhdkZrVW9EMndSVzR6cXNiWGxjRUo5ajM5NUV6?= =?utf-8?B?bjhFdVNYWlF2RU9nd2w5MWhPUHZGbDh0anNCamU1S3ErWkd3ZGI2UDNhTlJ0?= =?utf-8?B?OUE3Nm1ZYW01RUJKeE9kY3BYVk9ZenljWS92VHFKRWx5RklTaFo2anhDbllz?= =?utf-8?B?RGNwNWw5MFlYSnlidjZSTkhwc0JDSFlCTXFxZ1FkeXFMM0pHcStDL2J6WTZX?= =?utf-8?B?M09DNXcwSGQ1MW0wNERXZ05SS3lVVW5OVU1TbWl6RGpWN2IwZlpL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0wvMXY1enI5RVJ2enNlWXQ5dzdSN08zeVBSRXRabW9QNktUYTErZmhadXJu?= =?utf-8?B?aW9BbGxZNWpTVm5TcmthL3lTZjMyaDdZWU1zUDVMMUZNUnNVMkFodz09?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 02f047cc-4d0e-4af5-cee7-08dee37dafe2 X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5230.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jul 2026 21:03:29.6209 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: expsCKJWKAAJB3Uhx4NvKLeVCmBJKfTs0TVrHz0iFnfoqrT2cJWYH9KjEiFLBtf/XebJ4AfXuA2vXqndiuXNyQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7485 This series enables MBA bandwidth control emulation on ARM MPAM when the default MB control is disabled, using a node-scoped MB_NODE control as the native backend. It extends memory-bandwidth monitoring and control to memory-level MSCs or CPU-less NUMA nodes, and adds documentation and tests. Background On x86, MBA bandwidth control is typically associated with the L3 cache: schemata lines use L3 cache ids and monitor domains appear as mon_L3_XX. On some ARM MPAM systems the MBA control is backed by a memory-level MSC rather than the L3 cache MSC. A memory-level MSC is represented as a NUMA node, and that node commonly has no CPUs of its own (a memory-only node that still participates in bandwidth control). For such a resource the control scope is NODE, schemata identifiers are NUMA node ids, monitor domains are named mon_NODE_XX, and a node-scoped MB_NODE control may be the only control with usable bandwidth hardware. Because the memory-level MSC lives on a CPU-less NUMA node, the driver must handle nodes with no local CPUs. mpam_ris_get_affinity() derives affinity from the component's NUMA node id, so a memory-only node would otherwise end up with an empty CPU mask and never be registered. When the derived mask is empty, the driver falls back to cpu_possible_mask (masked by MSC accessibility) so the node still gets a resctrl domain. The borrowed affinity is kept out of class->affinity: those CPUs already contribute through CPU-ful nodes in the class, and subtracting the borrowed mask on teardown would remove CPUs that other live nodes still depend on. Domain setup iterates all MSC components per CPU (keyed by component), so each component — including these CPU-less memory nodes — gets its own control and monitor domain. Examples of NODE and emulation interfaces on MPAM. **MB disabled, MB_NODE enabled** (``MB`` emulated by ``MB_NODE``):: info/MB/resource_schemata/ ├── mode # [legacy] native └── MB/ ├── scope # NODE ├── status # disabled └── MB_NODE/ ├── scope # NODE └── status # enabled schemata: MB_NODE and MB keeps same values MB_NODE:0=100;1=100;2=100;10=100;18=100;26=100;34=100;35=100 MB:0=100;1=100;2=100;10=100;18=100;26=100;34=100;35=100 L3:1=ffff;2=ffff mon_data/ mon_L3_01 mon_NODE_00 mon_NODE_02 mon_NODE_18 mon_NODE_34 mon_L3_02 mon_NODE_01 mon_NODE_10 mon_NODE_26 mon_NODE_35 mon_data/mon_L3_01/llc_occupancy mon_data/mon_NODE_01/mbm_total_bytes Switch to native by writing to "mode": info/MB/resource_schemata/ ├── mode # legacy [native] ├── MB/ │ └── scope # NODE │ └── status # disabled └── MB_NODE/ # MB_NODE is moved to here ├── scope # NODE └── status # enabled schemata: Only show MB_NODE. No "MB:" is emulated. MB_NODE:0=100;1=100;2=100;10=100;18=100;26=100;34=100;35=100 L3:1=ffff;2=ffff mon_data/ mon_L3_01 mon_NODE_00 mon_NODE_02 mon_NODE_18 mon_NODE_34 mon_L3_02 mon_NODE_01 mon_NODE_10 mon_NODE_26 mon_NODE_35 mon_data/mon_L3_01/llc_occupancy mon_data/mon_NODE_01/mbm_total_bytes **MB enabled, MB_NODE enabled**:: Same for legacy and native: info/MB/resource_schemata/ ├── mode # [legacy] native ├── MB/ │ ├── scope # L3 │ └── status # enabled └── MB_NODE/ ├── scope # NODE └── status # enabled schemata: MB_NODE:0=100;1=100;2=100;10=100;18=100;26=100;34=100;35=100 MB:1=100;2=100 L3:1=ffff;2=ffff mon_data/ mon_L3_01 mon_NODE_00 mon_NODE_02 mon_NODE_18 mon_NODE_34 mon_L3_02 mon_NODE_01 mon_NODE_10 mon_NODE_26 mon_NODE_35 mon_data/mon_L3_01/llc_occupancy mon_data/mon_L3_01/mbm_total_bytes mon_data/mon_NODE_01/mbm_total_bytes The patches can be compiled but not tested on x86. The 23 patches are grouped as follows: 1. Fixes for previous issues (patches 1–2) Correct resource_schemata control subdirectory ownership on non-root resctrl mounts, and fix a NULL address access in the ARM MPAM driver. 2. resctrl control emulation (patches 3–8) Introduce the MBA emulation framework in the resctrl core: a writable legacy/native mode under info/MB/resource_schemata/, per-control status and nested schemata layout, schemata mirroring for controls without MBW hardware, and subdir rebuild when the mode changes. Patch 8 documents the user-visible behaviour in Documentation/filesystems/resctrl.rst. This group and group 4 are trying to implement the concept in discussion [1]. The main purpose of this group is to make CPU-less NUMA Node patches work. This implementation is only limited to MPAM CPU-less NUMA Node emulation. It needs to be enhanced to make another other emulation work, X86 memory region or RISC-V emulation etc. It's totally fine for me to either replace this implementation with another implementation or continue to enhance this implementition for control emulations. 3. Memory bandwidth monitoring and control on memory-level MSCs (patches 9–17) Generalise the monitor infrastructure beyond hard-wired L3 paths: de-hardcode L3 monitor plumbing, expose MBA MBM counter assignment, name node-scoped monitor domains mon_NODE_, add a node-scope MBM total event, and make MBM handling resource-aware. On the ARM MPAM side, add memory-level MSC and ABMC support, refine L3 topology and class selection, refactor domain setup to iterate all MSC components per CPU (keyed by component), and handle CPU-less NUMA memory nodes that have no local CPUs but still participate in MPAM bandwidth control. 4. MB_NODE emulates MB (patch 18) Wire MB_NODE as the native backend that emulates a disabled MB control in the ARM MPAM driver. 5. Documentation (patches 19–21) Document memory-level MB control and NUMA nodes in the arm64 MPAM guide (patch 19), NODE-scoped MBA domains and mon_NODE_* monitoring in the resctrl documentation (patch 20), and an MB_NODE emulation example on ARM MPAM (patch 21). 6. Tests (patches 22–23) Add a KUnit test for CPU-less NUMA node affinity handling and a kselftest that exercises MB emulation mode switching, resource_schemata hierarchy, and schemata mirroring on ARM MPAM. To apply the patches, on top of [2], Testing # KUnit (CPU-less affinity) ./tools/testing/kunit/kunit.py run test_mpam_devices # kselftest (MB emulation; requires ARM MPAM with disabled MB control) cd tools/testing/selftests/resctrl ./resctrl_tests -a mb_emulation_test The branch: https://github.com/fyu1/linux/ emul.cpu_less.rfc/ which is on top of [2]. [1] [RFC] mpam,x86,fs/resctrl: Generic schema description Proof of Concept https://lore.kernel.org/lkml/cd96bda7-675d-451e-b6d9-9fe4a405edbe@intel.com/ [2] Reinette's resctrl control branch: git://git.kernel.org/pub/scm/linux/kernel/git/reinette/linux.git branch resctrl/controls_rfc_v1 Fenghua Yu (23): resctrl: Fix ownership of resource_schemata control subdirectories arm_mpam: Fix NULL address access issue resctrl: Expose MBA resource_schemata mode sysfs resctrl: Expose per-control status in resource_schemata resctrl: Add nested resource_schemata support for emulated controls resctrl: Mirror schemata for controls without MBW hardware resctrl: Rebuild resource_schemata subdirs on MBA mode change Documentation: resctrl: document MBA control emulation resctrl: De-hardcode L3 monitor infrastructure resctrl: Expose MBA MBM counter assignment sysfs resctrl: name node-scoped monitor domains mon_NODE_ resctrl: Add node-scope MBM total event resctrl: Make MBM paths resource-aware arm_mpam: Support memory-level MSCs and ABMC per class arm_mpam: Refine L3 topology and class selection arm_mpam: Include all MSC components during domain setup arm_mpam: Handle CPU-less numa nodes arm_mpam: Emulate MB control with node-scoped MB_NODE control Documentation: arm64: mpam: document memory-level MB control and NUMA nodes Documentation: resctrl: document NODE-scoped MBA domains and mon_NODE monitoring Documentation: resctrl: document MB_NODE emulation example on ARM MPAM arm_mpam: Add KUnit test for CPU-less NUMA node affinity selftests/resctrl: Add MB emulation test for ARM MPAM Documentation/arch/arm64/mpam.rst | 105 ++-- Documentation/filesystems/resctrl.rst | 184 ++++++- arch/x86/kernel/cpu/resctrl/core.c | 2 + drivers/resctrl/mpam_devices.c | 59 +- drivers/resctrl/mpam_internal.h | 8 + drivers/resctrl/mpam_resctrl.c | 488 ++++++++++++----- drivers/resctrl/test_mpam_devices.c | 67 +++ fs/resctrl/ctrlmondata.c | 99 +++- fs/resctrl/internal.h | 9 +- fs/resctrl/monitor.c | 225 +++++--- fs/resctrl/rdtgroup.c | 507 +++++++++++++++--- include/linux/resctrl.h | 62 ++- include/linux/resctrl_types.h | 15 +- tools/testing/selftests/resctrl/config | 1 + .../selftests/resctrl/mb_emulation_test.c | 460 ++++++++++++++++ tools/testing/selftests/resctrl/resctrl.h | 1 + .../testing/selftests/resctrl/resctrl_tests.c | 1 + 17 files changed, 1942 insertions(+), 351 deletions(-) create mode 100644 tools/testing/selftests/resctrl/mb_emulation_test.c -- 2.43.0