From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 B2E3E314D35 for ; Fri, 17 Jul 2026 16:00:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.12 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784304055; cv=fail; b=mn9zPKWW2x7Zj5vZzwG1rv4D1TBnN3/vGTwcxC3gmoqMTha4ZWg11SkjnuzbN7fsTPvywf0wu/K4z3pSO+lJy/J8iG4WvE72xtSwL1+WEfq67ILWecf9rMpSF8rBhCRR2QoNegW+ch//1VmLluN6cJVbwzWjndONqugXVWkmxlY= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784304055; c=relaxed/simple; bh=Kdutv6XvycWf0jWEf8AIpHGRbUhZY5pE5iWWU3KUbAg=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=e/Q6GU5u48mqTbMzraf6f5xDkHav+gknjZpAoIiH6npgoYqkWoekcf0S5EYPjeNQ4MQ4EO+If8CsvRSRTnSE5X1rPLJ9Ii3DTNcYZu7lg19cvAz4FMrjITZDjuVmwlgzzlUMn/2OGA+ybB9piZth1/RWSn0fk2Doriht5I8oVHc= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=VXbPDyJg; arc=fail smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="VXbPDyJg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1784304053; x=1815840053; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=Kdutv6XvycWf0jWEf8AIpHGRbUhZY5pE5iWWU3KUbAg=; b=VXbPDyJgmoqeJD4MI+o6rtxL7Sq4I4d2x05BG4M9meXMSFhTQYcEhwgd IhUrZ80sLLRlxfHHA3NqtXbPbCuL5J/MLV0NbrsQeV/UWl7yHDnPQGeUA G1lFZ/Q7nzudxIHuyOWNoxTplmBnRTZTLPXKb7XZfuO5dB4ly86KApk4r 4+nkZ2pRluSuEjfTiUzyptoV6or725I0qw4j0asAhCb6Y7KM9ryRq+9zO iMcPc51sAZZQP94ufu+UbeN630sP+MPwsk9wpPkgJ8hCJEnxB/R486bUN BOHx8wEPtUr9MYITypC3L/Wt0Zcz6UbF2HZYeRO7POzWGXXDcZVHQJGV2 w==; X-CSE-ConnectionGUID: Cd50cmHjQZiXBg6iCH6JDw== X-CSE-MsgGUID: 11ib1Ua0SKKI0qI/knF9dw== X-IronPort-AV: E=McAfee;i="6800,10657,11848"; a="88799197" X-IronPort-AV: E=Sophos;i="6.25,169,1779174000"; d="scan'208";a="88799197" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2026 09:00:52 -0700 X-CSE-ConnectionGUID: 95M5h8svTsW7vbSXPZzCEA== X-CSE-MsgGUID: I0dKaBekSz256d4DDZih2g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,169,1779174000"; d="scan'208";a="261095191" Received: from orsmsx901.amr.corp.intel.com ([10.22.229.23]) by orviesa005.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2026 09:00:52 -0700 Received: from ORSMSX903.amr.corp.intel.com (10.22.229.25) by ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.43; Fri, 17 Jul 2026 09:00:51 -0700 Received: from ORSEDG902.ED.cps.intel.com (10.7.248.12) by ORSMSX903.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.43 via Frontend Transport; Fri, 17 Jul 2026 09:00:51 -0700 Received: from PH7PR06CU001.outbound.protection.outlook.com (52.101.201.28) by edgegateway.intel.com (134.134.137.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.43; Fri, 17 Jul 2026 09:00:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ynscgWnyb6VRxL/AO3NaGto+vO+5MIio1z0EXQRS8qH9Fqxv/aPwc3OOp/Bgi04xjNNipTEiZ0I5kjx/NbvmlR4akFwcZHzdVcx98DYRmTz8OcX3gF44cU2+COCoGjKJ6rUBUNcwi7EqemOap5OnEOsVghdyDKlRlHzbuViicfyxu+SL0V66c5LtZLHEvgTqHuvs2Ql3s5jYj+JTBevdCQiiKc2uQtO6IlXzwjuaVrxNAkrNOjKn+W9jjw8tZHuZHqoOCYwWGptlmOlOVcj6FZ30gaGKZ6+Yi2COStEfxJdjKN+lLOQdAFt8GlQl6xadPUiXVXtqGyrTusGSMwGvzQ== 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=3ywJoTbsMBTqPe9qyOWjO6c0ZtdwIpN3eApHDJu+Fr0=; b=N1yFQxiNFljgaW8L/Qa9WQwFQFKaKtAhK66FwGYMzGlcqIAQy3msCohUwPSaI71ccUPhL/MDxffx/fYPGzc03+XZsGjNwDOqC0yFGU17gYYmkNdGZC6mZ3rgaTALY+UEO9Ty6cXmJj2IOqJfHx55baKGExD0UJQPhHXRODx4cDwVmW9CsUtBu0NrWIGTsHBCfrL/i4hoLDItR9bD276MPJA7g8vHVfp2t6wV0ZhvGJDzTKnn6KV3zx0gQQw6DU6F0eMAu6fILs/ns7aAOXLcAhUvs0Zvq2xsVlsaQi/bgfIhrDaMvw2N4AsQBAlvmi0npFcdDwXuDHKUvincf1u2Ig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SJ2PR11MB8370.namprd11.prod.outlook.com (2603:10b6:a03:540::20) by DS0PR11MB7925.namprd11.prod.outlook.com (2603:10b6:8:f8::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.202.19; Fri, 17 Jul 2026 16:00:26 +0000 Received: from SJ2PR11MB8370.namprd11.prod.outlook.com ([fe80::b6cf:ce77:3cdf:7cc]) by SJ2PR11MB8370.namprd11.prod.outlook.com ([fe80::b6cf:ce77:3cdf:7cc%5]) with mapi id 15.21.0223.011; Fri, 17 Jul 2026 16:00:26 +0000 Message-ID: <8fd6caed-820f-457a-a1ef-a0a006fa52aa@intel.com> Date: Fri, 17 Jul 2026 09:00:24 -0700 User-Agent: Mozilla Thunderbird Subject: Re: [RFC] mpam,x86,fs/resctrl: Generic schema description Proof of Concept To: Ben Horgan , Fenghua Yu , "Tony Luck" , James Morse , Dave Martin , Babu Moger , Drew Fustini , Chen Yu CC: Borislav Petkov , Thomas Gleixner , "Dave Hansen" , Peter Newman , "x86@kernel.org" , "linux-kernel@vger.kernel.org" References: <5ee87762-1898-4b62-94da-85b3e9917ecc@intel.com> <62701203-c4a3-4ec2-a9af-602e1fc15863@nvidia.com> <8f9f78dd-e3f5-4b35-bc72-0eb5dafdcedf@nvidia.com> <36163a81-9737-49e3-93ef-6c392f7272f0@intel.com> <0fc6df54-26c7-43fa-948a-528cd94937f1@arm.com> <9049378c-699a-4155-b1e4-737a1d7265d5@intel.com> <57740b97-80ee-4632-bca3-dc43cd7776c2@arm.com> <44f26cd4-be79-476e-b002-7ccfb7705179@intel.com> <749bd904-523d-4e9d-8493-0e8cfd79949e@arm.com> <9db33feb-cf04-420c-a99a-e31e4b8e4954@arm.com> From: Reinette Chatre Content-Language: en-US In-Reply-To: <9db33feb-cf04-420c-a99a-e31e4b8e4954@arm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: MW4PR04CA0388.namprd04.prod.outlook.com (2603:10b6:303:81::33) To SJ2PR11MB8370.namprd11.prod.outlook.com (2603:10b6:a03:540::20) 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: SJ2PR11MB8370:EE_|DS0PR11MB7925:EE_ X-MS-Office365-Filtering-Correlation-Id: 1dae6bc5-447b-482b-c5f9-08dee41c8439 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|23010399003|366016|376014|7416014|10067099003|3023799007|4143699003|22082099003|11063799006|6133799003|18002099003|56012099006; X-Microsoft-Antispam-Message-Info: 7nZ6TMMeKfIwOh3gy3U34Vs1F7likqpvBZyb1VNc9zNe4drUdEjSPvOJiT0RDfrr12CWUiRar4BbdV3uPbBG9StmqYA1rNrNiuva4TOaxsgBSyKl0NYcp6fWYyrl15D+hvcapkYKiehsVcmkvia1sC+ReA68JQswJCrt/bbqpHS/S/vrqoO2xxla4/TwF4E2CjRQyT8PuNIuZsDl4T783sw9nGkt2aumAL9sDJfGCzJnBcTJTyWX6m6YvuRRGkzGtCNTyQSguaxpwIe/0lKkEx5334J31fj7OvKBWzWFWCiSY5ZnlZZu6rVJMHo2PgleLu0Za6Sb2A5zlNC5eUyVgJ9CrhAgwMVpySrpOV4i5ukHtWcfk+YB4TTtzPgezGEHG3C082ZMuHyF1cTmqrT1SMMK7KctGjfw1o4wvyhRoUA5ADgc3kBW6gEmSFcuZ8h5KS5YxVCVOhgpjSFdCdbzQYIRJH1rrshNoLyRHBnt1X8veRAI0ZL+YI9Tf+fEN5iQAc2YwtV/s/wtPmrnOLjdSkZZR2/VC0HXngJEDWS6NNUQh9rv0uH+3lmXEHOvzrbDBR0KZR4YcrNWlq+stp1HLojR8Il+p0ZqyYLMous8aZmutgEprNcx7ypydsdtNsoB X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ2PR11MB8370.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(23010399003)(366016)(376014)(7416014)(10067099003)(3023799007)(4143699003)(22082099003)(11063799006)(6133799003)(18002099003)(56012099006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?M2krWlhFNjJQWkJvdWhCSnA4bjlDcUtDd0tiRjZkT3U1OGFzUXJOZnRsOUYr?= =?utf-8?B?VVNja3Bubk1OcFBlanNTQjdJRmRMWWVqMlR2VVJkNmRLMmJVbHRwNk1YZTJi?= =?utf-8?B?U3JVcDc1THA5bCtIZzBoQm0vaC9GWW1pZW9oTDllbnZKRjR1YkNpVFVUS1R6?= =?utf-8?B?cHpkQlpSOW9VZlhHRlpPWlpqS0cwaFJUcSt5OUd5RzExaktES21DWGp5U3dR?= =?utf-8?B?bDJrOHRKaVVI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WRoRGp6OGdxOC9Eb2hG?= =?utf-8?B?OW9WYzJLSUttTm1LSTFKaVJyZUhGZlJ5ZmJGWE9JajFSZFlHTE9VRkgrcE5r?= =?utf-8?B?aU1iSkd1bkRzTHlkVDRzTXBWd09ScmYyWEllU1prSGhQVkIxS2JaVWxCY3o3?= =?utf-8?B?VXQvM1JCWFg5Qkk1UHpqVldSeG5kUnBRZTM4TW92Y1F1RU5HMFBnU3dOWVV2?= =?utf-8?B?UmFaQnhUNUVmek1hWTBqSmdYWDUwR3FMQ3FsTkw0d201YVAyeUFXSlFyNFZs?= =?utf-8?B?aWlDWmtnU3pWYldzajEwdnc4YWtueFFSdnJ1a3ZNaWhFU3NuL3FxZEI5ekdl?= =?utf-8?Q?MptBv/7YNAPirk9M=3D?= X-Exchange-RoutingPolicyChecked: oVnQd/v/HBO8ddDOYuexYkeiM/1wPhJT+X77HB6Xs8Oe4mWPIIkz+1B/bASrjrm0BS5Rwex0FOpo7I48b1floqLMOWVVyT+K8AKKDs6KCVYmPz0h5i384iGNLncp3H5COJWk8vutCfZrnGNa5qNyiqVUEirzGv6Zq1uiIt4dcGCAg7QSiPZPtEy99r7SFp0kGEM21hi2bTXMveslwvFKCINQxAgSK1dNSYemxJ6gHjFedGKDt+xyK8w3CPZRU2MvcsqKOxha+PoGxUzNf1+qUiMqjRwVRM59m9DHEtGsyyXVM0A2DEO3vkZyxSTfjGtYshL9+oA174nAywtGH1yFeQ== X-MS-Exchange-CrossTenant-Network-Message-Id: 1dae6bc5-447b-482b-c5f9-08dee41c8439 X-MS-Exchange-CrossTenant-AuthSource: SJ2PR11MB8370.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2026 16:00:26.3409 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: X1CiR1MURM8YFHrDDSuTlcFpNI2o6TAcYltKcZjPH46saSRhyazgYnQCq2MrSr3QoGM2sacvjcHFfWJUQEgS2Fr3rG4BK5hza2Tk1jjAvpY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB7925 X-OriginatorOrg: intel.com Hi Ben, On 7/17/26 5:20 AM, Ben Horgan wrote: > On 7/16/26 18:07, Reinette Chatre wrote: >> On 7/16/26 9:44 AM, Ben Horgan wrote: >>> On 7/16/26 17:04, Reinette Chatre wrote: >>>> Hi Ben, Chenyu, and Tony, >>>> >>>> On 7/16/26 7:59 AM, Ben Horgan wrote: >>>>> On 7/15/26 16:41, Reinette Chatre wrote: >>>>>> On 7/15/26 1:34 AM, Ben Horgan wrote: >>>>>>> On 7/14/26 23:06, Reinette Chatre wrote: ... >>>>>>> Alternatively, could the "mode" file be used to switch between "MB" and "MB_MAX" and the two never >>>>>>> need be shown at the same time. The user opts in to using the new interface, "MB_MAX" by setting >>>>>>> "mode" and can just toggle back if they want to use "MB" directly again. >>>>>> Interesting. So far the "mode" options have been "legacy" and "native" where "legacy" would show the >>>>>> legacy as well as emulated controls in the schemata file and "native" will only show the new controls. >>>>>> resctrl could make the default of "legacy" mean that *only* the legacy control is shown without insight >>>>>> into the controls it is being emulated with. The only insight to this would continue to be via the >>>>>> hierarchy in the info directory, which would show relationship but not the actual control values. >>>>>> Do you think there could be a need for users (excluding validation?) that may want to see the underlying >>>>>> control values used to emulate a legacy control? >>>>> >>>>> They may want to see the underlying values to be able to migrate there legacy configuration to the >>>>> native configuration but they can just write their legacy configuration and then toggle the mode to >>>>> see the values in the native mode. >>>>> >>>>>> >>>>>> I assume for backward compatibility that "legacy" would remain the default so a possible inconvenience >>>>>> here would be that users familiar with the new controls would forever need to switch the mode before being >>>>>> able to use them. >>>>> >>>>> This does also make the new controls slightly harder to discover. >>>>> >>>> What if resctrl combines the two suggestions? Specifically, for backward compatibility the mode will be >>>> "legacy" and if there are emulated controls then resctrl displays them in schemata file with "#" prefix >>>> but not(*) support any changes from user space to the underlying hardware controls. This will make new controls >>>> easier to discover and let user space see the underlying values, but not break a user space that >>>> may read schemata file, change a few values, and write entire file back. >>> >>> My initial impression is that this would work but is probably unnecessary. >> >> ok. My goal was to present ideas to address the issues raised so far. Ideally this would result in discussion of >> pros/cons. If you find this unnecessary, could you please expand with some insight into which parts you find >> unnecessary or how you would prefer this solved? I am finding it difficult to interpret above response. > > Sorry, yes. I was a bit lazy in my reply yesterday. If the mode is easy and non-destructive to > change then doesn't the user get the same information with just the burden of toggling the mode and > then reading the schemata a second time. This does rely on the user being aware of the new behaviour > though. > > If the emulation isn't a, one to one, bijection then is changing mode expected to be destructive? > More on this below. There may be some corner cases (region aware may have some as you highlight below), but in general I do not expect changing mode to be destructive. The idea behind giving insight into underlying control values while legacy interface is in use is to address your earlier point that not doing so will make new controls slightly harder to discover. (more below) >>>> How the "enabled" vs "disabled" state of a control works with this needs some confirmation since region-aware >>>> MBA support has this extra caveat of supporting MSR and ACPI interfaces which results in the relationship >>>> between "mode" and "status" of underlying controls not being consistent. This may be ok but please consider >>>> example below. >>>> >>>> Thinking through this with examples as I understand MPAM and RDT region aware so far. Could this work for >>>> MPAM and region aware MBA? >>>> >>>> (*) Should resctrl allow user space to change underlying control value of an emulated control in "legacy" mode? >>> >>> I don't think this causes problems for MPAM but for RDT region aware controls couldn't you end up >>> with a control state that isn't reachable just by configuring the legacy schema. >> >> Could you please highlight the scenario you refer to? > > My expectation here was that for any value of MB, X, the value for each of the regions would be the > same, Y. (Not sure if this is actually the case.) > > MB: X > # MB_REGION0_MAX:Y > # MB_REGION1_MAX:Y > # MB_REGION2_MAX:Y > # MB_REGION3_MAX:Y > > So, if one of the regions was to be changed individually then it would be in a state not reachable > by just changing the legacy control, MB. Potentially this complicated switching mode as well as > uncommenting and writing a schemata. Indeed. This scenario was highlighted in slide 8 of https://lpc.events/event/19/contributions/2093/attachments/1958/4172/resctrl%20Microconference%20LPC%202025%20Tokyo.pdf and discussed between Tony and Dave Martin in the thread starting at https://lore.kernel.org/lkml/aPf0OKwDZ4XbmVRB@agluck-desk3/ Tony and Dave discussed a few scenarios and how resctrl could behave with different user interactions. On a high level I understood that the underlying controls will always, as you state below, "show the full story" and if user space interacts with them (instead of using the legacy control) then the control values associated with the legacy control cannot be relied on to represent accurate state to the point that it may even be better to not be visible. You are right, this is a good motivation to not allow user to modify underlying controls when in "legacy" mode. The remaining open is whether resctrl should display the (read-only) underlying control values in schemata file when in "legacy" mode. By default this does not work for region-aware since it will at least initially use different hardware interfaces for the different controls, essentially this means that there is no actual emulation and the legacy and region aware control are both legitimate hardware controls. Specifically, considering your example, there is no mapping from "X" to "Y". The way region-aware is planning to address this is to use the "enabled" vs "disabled" status of a control to start with underlying controls disabled so that they are not displayed in schemata file when legacy mode is enabled. If resctrl instead only displays legacy controls when in "legacy" mode then the "status" may no longer be needed for region-aware. RISC-V also considered using this "status" that I think may also be solved with this approach, I am not sure though. > I was thinking that in legacy mode that the region values would always be kept the same but perhaps > the legacy (MB) value could just be the 'best estimate' and the native (MB_REGION0) values show the > full story. 'best estimate' could be difficult to choose but allows switching mode to be > non-destructive. > > For MPAM, at least until Fenghua sent his series today on MBA control emulation [1], I was expecting > that MPAM would only use emulation for exposing finer grade controls to the user and not allowing > different underlying hardware to be used for the emulation. To me, it seems reasonable that a new > control would involve a new schema but I do appreciate the benefit of being able to continue to use > the old interface without stopping a new interface being used. The danger is that there are > unexpected user visible side effects, e.g. domain lifetime, and that control behaviour is different > from the user expectations. I have not looked at Fenghua's series in detail but from earlier discussion I understood the high level problem to be that user space may have expectation that for every "resource" represented by a directory in info/ there is a matching entry in the schemata file. Whether this is an actual expectation from user space tools is not obvious to me though: there is already an exception since there is the "L3_MON" "resource" that does not have a schemata file entry. To ensure backward compatibility the safest would be for resctrl to always provide a "MB" control via an entry in the schemata file when the "MB" resource is exposed via info/. If on the other hand resctrl is not expected to provide a "MB" entry in schemata file when there is a "MB" resource described in info/MB then resctrl should not be forced to always provide such emulation. I would appreciate your thoughts here. > [1] https://lore.kernel.org/linux-arm-kernel/cover.1784217438.git.fenghuay@nvidia.com/ > >>> >>>> >>>> MPAM >>>> ==== >>>> 1) System default >>>> >>>> info hierarchy >>>> -------------- >>>> info/ >>>> └── MB/ >>>> └── schemata/ >>>> ├── MB/ >>>> │   ├── MB_MAX/ >>>> │   │   └── status:enabled >>>> │   └── status:enabled >>>> └── mode:[legacy] native >>>> >>>> schemata file >>>> ------------- >>>> MB:... >>>> # MB_MAX:... >>>> >>>> - In above, user space attempting to change MB_MAX via schemata file with or without "#" prefix will have no effect. >>>> TBD: there should not be obstacles to resctrl supporting user space changes by removing the "#" prefix. >>> >>> Perhaps a different prefix for read only lines as opposed to commented lines. >> >> Which prefix do you have in mind? > > I was avoiding that.. but perhaps for read only lines perhaps they could be in brackets as it hints > at it being an extra explanation. > > (MB_MAX:...) Sure (although it seems we are moving away from this approach). Reinette