From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 BC22F545DB0 for ; Tue, 13 Oct 2026 20:26:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.17 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791923166; cv=fail; b=PfSFppPvwlZUyusj7dVstHzAPxIbBXjkYm6IFqhElJCHrlelj/eq3tFMEwcHDAoIIbW3QKwGREsBuPsF5zyHlHF09bQprhRhLBqDelUvptah6vYwfloSmdvGyKdvYSTGuMG13VV6+6RKfbXCMgQo8jl+bniuA0loVYLnjbKkQK4= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791923166; c=relaxed/simple; bh=RJqO1rziYIG7peN3q/q14TZjXvpcufKA3g+E2XlP+pQ=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=inDWHNH91hNUEX/VIQyghESxUbWEfs+h69l82a1aX24aIV6n1RneD1aI4fB5ftGx47QxOfc8LTWUblUKy0fPbahYeduEhqIwrLEtgGH3lTLDrqkNBpUdJ//vYCT37faGLV60kE9GVeL1i9DKdPmbaabIwpm5BFsryshKwJTuVg4= 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=M/AAWbVz; arc=fail smtp.client-ip=192.198.163.17 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="M/AAWbVz" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1791923163; x=1823459163; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=RJqO1rziYIG7peN3q/q14TZjXvpcufKA3g+E2XlP+pQ=; b=M/AAWbVzZLUjY91609JEPFwo84cHXxeaM7TyhmbLsDWqy+mMwsJ9QVPt XAkwKx8/rcJCVw8lR8/AWiOh5ISuNlnHy9dWSK4qYn/9ssojQpNJZ281V BqGpbiGMkd+oXMtBDjdgkl87Vnux0Uq7hIvsYEoWpwdiaAShH88cNVRYs Dalju4CURjyW2UFSmK+l/QEXTMAtQnk0GkrdSC1GRJk4rHBRPG1l28pZa vKtqMTZCgSsXDqMEQNCgZ4cXpLcRneKmIxIPV3uR1zVn+ob9xxetlz45U lrGoa3CWKAMMDvTcy3p2H4xwN1kwrTP2sNDPCEMycNGM7ouqBWNsdGa1h A==; X-CSE-ConnectionGUID: /dC2AkSBR82NMwkFOt5Qeg== X-CSE-MsgGUID: o/vxdEpBRCK4+xdc9ShoGQ== X-IronPort-AV: E=McAfee;i="6800,10657,11934"; a="668184" X-IronPort-AV: E=Sophos;i="6.27,156,1787036400"; d="scan'208";a="668184" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2026 13:26:02 -0700 X-CSE-ConnectionGUID: LFyfIpH/QE+B4NkyyheUwQ== X-CSE-MsgGUID: 8opbNrG2SraBdIJEEvL3tA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,156,1787036400"; d="scan'208";a="1180144" Received: from fmsmsx903.amr.corp.intel.com ([10.18.126.92]) by orviesa009.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2026 13:26:02 -0700 Received: from FMSMSX902.amr.corp.intel.com (10.18.126.91) by fmsmsx903.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.49; Tue, 13 Oct 2026 13:26:01 -0700 Received: from fmsedg901.ED.cps.intel.com (10.1.192.143) by FMSMSX902.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.49 via Frontend Transport; Tue, 13 Oct 2026 13:26:01 -0700 Received: from PH7PR06CU001.outbound.protection.outlook.com (52.101.201.65) by edgegateway.intel.com (192.55.55.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.49; Tue, 13 Oct 2026 13:26:01 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=K2ybm/JGCDlCzskl+3MoMUB/qHYyNlKwmYuVQlwObEHQ4EixsAAQKc7sHnDx0ioAOj/bTzdn8vy2RdX9AkX03WpMZXxbLLk9bAwTEFdpwJ76qjwT//7EYwD/g5G9SZeUoQ2a1oDebRSw8YLtjizFQkW/DX5HQgo2wz10TdytMuTsLZKkCG1rV46QhFekOWByObjjL9cDbkG0r/FUijz8Dc8D0hLcJaYcvQEOvF7onU8/fRQaaOkV+HHJM7zYEKKZvC14iWoFYyT0MJAG5OM3qflDzARk+dS+LuaUjY+QMsn4OiVMl05kD+pzXqXRRPiJOSj17VHuTddOHXZ2Ju3Zhw== 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=XV/pE74gML1l+/y7WteDsc1GooZfJ+z2cHvYBI0TEok=; b=u0Ag2bqd/Q9DiHYxSvntvfcYuFC0ddM+E8OYRzpA1UsdmGMOI27HWP4Q2nxNWlrcsX5LBOE7Cy/Qs18Jka8XoLzWIPYDhvX2nFQ3ihSurzFu/KLFgTs1sMruM+xG8v0YPLo5MOCUxeY02FE8YJ02jAaxaghAwYlWJVqCBJdswMsD139GQ7ogfrelsWo4Dgrp+hKsZH6FY/FoXgOSmnDPptL+TYwqbDcKPX18IJCGMRIi5mnrWSUcQNRvGkZ4sPDcf6R8j45AaOH6REb2hEgiR2Ey8ALjk6MPOGRMQBZJNVGTur6ISV1xnqZfPJzGsqHqeVq3kJx5+V1OEKJ7WiVOPg== 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: mx.microsoft.com 1; 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 MW3PR11MB4554.namprd11.prod.outlook.com (2603:10b6:303:5d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.496.23; Tue, 13 Oct 2026 20:25:59 +0000 Received: from SJ2PR11MB8370.namprd11.prod.outlook.com ([fe80::b6cf:ce77:3cdf:7cc]) by SJ2PR11MB8370.namprd11.prod.outlook.com ([fe80::b6cf:ce77:3cdf:7cc%6]) with mapi id 15.21.0496.021; Tue, 13 Oct 2026 20:25:58 +0000 Message-ID: Date: Tue, 13 Oct 2026 13:25:56 -0700 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 2/3] fs/resctrl: Assign counters to existing groups when enabling mbm_event To: Babu Moger , Ben Horgan , , CC: , , , , , , , , , , , , , , , References: <3d966ae2e051ef54e1aedb1a2839c812ab880bcb.1791589412.git.babu.moger@amd.com> <171f92a3-fa2e-44fb-b0d1-1250c72e31d1@amd.com> <4af177a1-7602-4b0a-a8ba-81575f1ec80f@intel.com> <655152e8-2076-4558-916c-d55f88f0f1ed@amd.com> From: Reinette Chatre Content-Language: en-US In-Reply-To: <655152e8-2076-4558-916c-d55f88f0f1ed@amd.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: MW4P223CA0018.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::23) To SJ2PR11MB8370.namprd11.prod.outlook.com (2603:10b6:a03:540::20) Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR11MB8370:EE_|MW3PR11MB4554:EE_ X-MS-Office365-Filtering-Correlation-Id: 9df71fa5-abec-4e84-d9d7-08df29683122 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|7416014|1800799024|23010399003|56012099006|11063799006|4143699003|261009223027099003|260925021911599003|260925021311599003|260925022911599003|22082099003|10067099003|18002099003|6133799003|13003099007; X-Microsoft-Antispam-Message-Info: vCGQPM4axU3/HkDUBDFqKIR+5Iw0O11ibfwCFCyV3whhuy/CGtRqow+55OhwIGgXAAv8Z1tUaGOT7lrglIWBw9z2Kc1NLL9QlJUbx7cV16kcS6078Nqb8rd79AQqzy4sfmtt6a6klHIE0unlayE1JwNhHhZKXtmaJQUmmg9uH8ociA3UwDbdh3iOSI28k9IBC2HKhGOvg3mjzpsUapVoB6ZLXZY3VCJpBjEh2HRUJuw5HG+CKb9kIBaeKv8YiUYkJ21iyU5nDnAq7MvV3xZD5j0r0ACTFXHRX/dcLuRqygguw+Em7gCkga14uHiz07u3TZ49bt6yM85e7K4WdX+emk0L5Oj3tXb/0pgmeGucREbn2X8z4HKJKL4UUwrX7zK3E6lu6UqVVfqxtF1aT5n8mRHqeP4p7DKY/eNTRQK49xbLYCs/aFNDKBXj6GGFvMOQbBvb0pXSz+44hCjNcdok52edMXte9ACfHsul5rloxUsp0ojI4tv0qPX2O0FF1rxIJeTzc6NDBBxbfadaAKxaeTZothXBjUStjr49KXRuRgFMdaY77rFi/4Fe0ZQepyo2YLX/fOPp7AtZfUyeD64mrAjwKfdzAdpIV86U1lzgJJo= 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)(376014)(366016)(7416014)(1800799024)(23010399003)(56012099006)(11063799006)(4143699003)(261009223027099003)(260925021911599003)(260925021311599003)(260925022911599003)(22082099003)(10067099003)(18002099003)(6133799003)(13003099007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YnFBTW91R1hiNklQTDJxRkNQS2F2NGNVN3ZXcjBTeWphTUxHU3ovSTFybUw5?= =?utf-8?B?WW9FeHMzRWxGb05yUkR3REdUM20zY3ZxU000dWE3S2s3cnNpamp4N3pDS3lz?= =?utf-8?B?VlhmbmJLcEpkTjJTVmxoNk8xMHpHNksvYUF0dFJWYXlET0F0QlhxR2N6SHgz?= =?utf-8?B?dGhlbUpRL25VUW9MY3V0RHhWL0h2V0xIRzVObG5rMUJkNGxPUlhCVDArcTFR?= =?utf-8?B?d3JUeFdRQmYvMmFIOVlTRDNBWTh4UjB6c0gxamJOcGhkME5BVWt6SEg1RkFD?= =?utf-8?B?Ny9YQ2haVjMveVN0eGprZTBmUXJWK2pTMFhRYVZ1TE00N1JjdnBkUG5SMDM2?= =?utf-8?B?SzUrcnhjM3pyTEJ3UnlKWmV6My94U29VTVU0TzdBZXh2a3VscjV4ZUZ6bVAx?= =?utf-8?B?QlRyTS9LMHNXZ04yVVNFNGpqZktSWGQrOUlQWWV4S0twbkRQY3JIZ3FWSW8w?= =?utf-8?B?U1RjbnF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Gc2pEUFIxSFJVNmNJ?= =?utf-8?B?aFZuWXlqai9rN3p3VzZqZ2RPTDFTb3BuNjhxckVNK2xDS25vMm5NWjlpQWlS?= =?utf-8?Q?xE6yhTz6yurd01wU=3D?= X-Exchange-RoutingPolicyChecked: ypbaZKmpT0EmwNuzPNP6Jei1nCwhNXu/5My5WeUi2Mim3/ud6nKHwSDnz1imX6EfBfxnJ/aGonp6Hbm8USeZoatmBHefb2u0dE+jWb/jHRO9RTZYI4zY8inyU0V/iYn9/oxB1iZkZn3UUjcKvKus3V1OOBdmS3w1Qjyex8t00zhns5okcELYfwqkCeCfWj4jOVLzEb5QTEl3D01OZCmLoI2j2fBBPyPJLIQzcB6RZvKajcXP6X21Pa0wKOKxsTc3y1mS4OrN+95u6c0g8Ko87JWLFIBNgzNVzjuWhDyn1iRc8RkaLOU5nAWBCTxwlMKTLq2HZSJDN4D/jA3mJnvsYg== X-MS-Exchange-CrossTenant-Network-Message-Id: 9df71fa5-abec-4e84-d9d7-08df29683122 X-MS-Exchange-CrossTenant-AuthSource: SJ2PR11MB8370.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2026 20:25:58.9157 (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: l/LEiAo7UASY5LP3MbnttRP6/I0POUf/19NoCSEzP1qIpkK5oHU0xjvyPxTU26hQG3Asg1UhuhUUD7j5g82fMKGhW+Ijn9Mhz32MLtcXkMc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4554 X-OriginatorOrg: intel.com Hi Babu, On 10/13/26 11:52 AM, Babu Moger wrote: > On 10/13/26 13:22, Reinette Chatre wrote: >> On 10/13/26 9:51 AM, Babu Moger wrote: >>> On 10/13/26 10:57, Ben Horgan wrote: >>>> On 10/10/2026 00:44, Babu Moger wrote: >>>>> When the user switches counter assignment mode by writing "mbm_event" to >>>>> /sys/fs/resctrl/info/L3_MON/mbm_assign_mode, resctrl frees all assignable >>>>> counters, resets per-domain RMID state, and enables counter auto-assignment >>>>> exposed to user space as mbm_assign_on_mkdir. >>>>> >>>>> Even though counter auto-assignment is enabled, groups that already exist >>>>> at the time of the switch, including the default group created at mount, >>>>> are not assigned a counter. All MBM events read "Unassigned" until the user >>>>> assigns a counter by hand. >>>>> >>>>> Walk every existing CTRL_MON and its MON children after the reset and >>>>> assign counters to their MBM events. Enabling "mbm_event" now leaves the >>>>> same per-group state that auto-assignment would have produced. There may be >>>>> fewer available counters than MBM events across the existing groups; in >>>>> that case stop assignment when no counters remain. Events in the remaining >>>>> groups read "Unassigned", matching the behavior of creating a group when no >>>>> counters are available. Also revise the rdtgroup_assign_cntrs() function >>>>> comments to account for the new callers. >>>>> >>>>> Fixes: 8004ea01cf63 ("fs/resctrl: Introduce the interface to switch between monitor modes") >>>>> Reported-by: Sashiko >>>>> Closes: https://sashiko.dev/#/patchset/8cb66e18e32e4087a9712c1e68ee6da614efe244.1784322818.git.babu.moger%40amd.com >>>>> Signed-off-by: Babu Moger >>>>> Cc: stable@vger.kernel.org >>>>> --- >>>>> v4: Changelog update (Reinette's input). >>>>>       Function comment update for rdtgroup_assign_cntrs(). >>>>> >>>>> v3: Changelog update. >>>>>       Code comment cleanup. >>>>>       Added Cc to stable. >>>>>       Added Reported-by and Closes tags. >>>>> >>>>> v2: New patch. >>>>>       This patch addresses the Sashiko comment about documentation issue where >>>>>       counters are not assigned automatically when mode is switched to mbm_event. >>>>>       https://sashiko.dev/#/patchset/8cb66e18e32e4087a9712c1e68ee6da614efe244.1784322818.git.babu.moger%40amd.com >>>>>       In fact, it exposed a real issue. When switching to mbm_event mode, existing >>>>>       monitoring groups should be assigned counters whenever counters are available. >>>>>       This provides a smooth transition between modes and aligns the behavior with >>>>>       the existing auto-assignment mechanism. >>>> >>>> >>>> Given the name of the option is 'mbm_assign_on_mkdir' I expected the auto assignment to only occur >>>> on the creation of ctrl groups or monitor groups. That's not my concern though. As you are now >>>> treating this as more of a general auto assignment should the assignment also be done when a resctrl >>>> domain is brought back online. >>>> >>>> For illustration on an MPAM model I see: >>>> >>>> /sys/fs/resctrl# cat mbm_L3_assignments >>>> mbm_total_bytes:2=e;3=e >>>> >>>> # offline one domain >>>> /sys/fs/resctrl# for i in $(seq 0 3); do echo 0 > /sys/devices/system/cpu/cpu$i/online; done >>>> /sys/fs/resctrl# cat mbm_L3_assignments >>>> mbm_total_bytes:3=e >>>> >>>> # bring the domain back online >>>> /sys/fs/resctrl# cat mbm_L3_assignments >>>> mbm_total_bytes:2=_;3=e # Would it be better, or worse, for auto-assignment to occur here? >>>> >>> Interesting. >>> >>> We don't know the previous state. What if it looked like this before the CPU was taken offline? >>> >>> /sys/fs/resctrl# cat mbm_L3_assignments >>> mbm_total_bytes:2=_;3=e >>> >>> In that case, forcing auto-assignment may not be the right thing to do. >>> Since we don't know the previous state, we can only speculate. >>> >>> It may be best to leave this decision to the user. >> I think this raises an important point. To get a better idea I looked back at the original >> bug report referenced by the "Closes:" tag and I do not think this is a relevant fix for >> that bug. >> >> Let me elaborate ... >> >> The bug reported by Sashiko was in response to the patch that added a step to >> "Examples on working with mbm_assign_mode" to switch to mbm_event mode from default >> mode. The rest of the example was not changed to accommodate the assign mode change >> and the documentation thus reflected the state of a system that was in mbm_event mode when >> the resource groups were created, not in the new default mode. >> >> In this new version of the series the documentation change looks different - it does >> not imply that the system started out in default mode and thus does not imply any >> mode under which those resource groups were created. >> >> I agree with your final statement "It may be best to leave this decision to the user.". >> It is not possible for resctrl to know how user intends to assign counters. Why not just >> leave them all unassigned when switching to mbm_event mode? >> > > That is a good point. We can do that. > > Should we treat the default group as a special case and handle it differently? I am missing why the default group is special here. As I understand user space can allocate counters to the events belonging to the default group just the same as any other group. Could you please elaborate what sets the default group apart here? Reinette