From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (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 A32B533B97B for ; Tue, 25 Aug 2026 16:11:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.18 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787674312; cv=fail; b=E76RZWUZJCs8sNGf1vCoL95Y3QB9S5tCKmL6q/LNrvSNANVJbfY+NkY6itC57fr0PIOy1+G6+Sb0WYeRemwa2h8blSMcJ/B2Qmi0BOtzeA++Al4/LoZMS67vWjalc47CyBMrPLE2r8+xJXbmszW+jqV3FvWpU5RnobvhxMPU7Ng= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787674312; c=relaxed/simple; bh=iQpKm8mjvqtW+dsVmliwxeufhfSgh37EsUc+JEqSLd4=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=bn0OTZKwoVwpdQ6yir82YC5+xtFwCvXOVMlIPD+FdxAZBYZYf4X/aODuhqYKafD2s8PfcQ5xe3Aud2NLnzQBxWf9j3Fi5eLcGKO/3hlutO7GjKzKeXgbRjyoz1P0X46QrNHcbmGqKgFDzKtYllFwrAPVZud+mGjTSKF88lC77Y0= 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=CwIoNynA; arc=fail smtp.client-ip=192.198.163.18 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="CwIoNynA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1787674309; x=1819210309; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=iQpKm8mjvqtW+dsVmliwxeufhfSgh37EsUc+JEqSLd4=; b=CwIoNynAwp63iZuUhZqY+k0uWO9/eeJBgCl+e46E5/I9vacZ/msiwyEE f1O1g+f5r/N5m+2PXVb+uUEMe3aDizJmcZ3LSjR88izf2SaCX4ptOz6EJ hhjUj4AtFN5eatDHcIQTXHQNPvMjD7gES8wbNy0ItJF3susZvb6bOyak4 qxPx4qxC9gVCTgRvtaFLPY1UxMImb2trhXsA1EK1xMJhVnSyNJM5CF749 HnMgYyARMW1NRWWoHlFdCtXLFA9d5EebDthAfvaaAB7d3wS6TlGnzcuIq MuwLYPvH2rHL5vyoP5OP6ObS8EJb61oDZA378vUK6qoSzXiw8RFbLYKxb g==; X-CSE-ConnectionGUID: ko+xg8rVRkSMVhvBhs6+dg== X-CSE-MsgGUID: n3bbgIrZRyu47lTAnr5X0w== X-IronPort-AV: E=McAfee;i="6800,10657,11886"; a="87273634" X-IronPort-AV: E=Sophos;i="6.25,243,1779174000"; d="scan'208";a="87273634" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2026 09:11:48 -0700 X-CSE-ConnectionGUID: smHPlrWOQmaPoZm9RlQoug== X-CSE-MsgGUID: UnNTPMMVQ4a9jyftUYcv+Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,243,1779174000"; d="scan'208";a="297239791" Received: from fmsmsx901.amr.corp.intel.com ([10.18.126.90]) by orviesa002.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2026 09:11:49 -0700 Received: from FMSMSX901.amr.corp.intel.com (10.18.126.90) by fmsmsx901.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45; Tue, 25 Aug 2026 09:11:48 -0700 Received: from fmsedg903.ED.cps.intel.com (10.1.192.145) by FMSMSX901.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45 via Frontend Transport; Tue, 25 Aug 2026 09:11:48 -0700 Received: from BL0PR03CU003.outbound.protection.outlook.com (52.101.53.39) by edgegateway.intel.com (192.55.55.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45; Tue, 25 Aug 2026 09:11:42 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=H11rm0hnh6LV7ocdZaGS6TgZTr2dLeJVDhVdUD3+wkLSJR0abZ0KL/n4q6If0rYFevSbvPcRWLFwGyHu53arJt3rO/MNE3PQKArF/7oz27E+wPwt8miYgf32MdX/ZgD5gzwbxFggBJNN41rXXX/lOVMoIT6Niikmtr9QI4Y69EnxKkfXoYPmYhU8DZWF1CrMXwrMVwGpcwHRPwSzHUzhYQEvO4+UYr60hyDxm8Qix+EEsLCD3E72NDmC/1ROdybB9IyvDmEnpwLm+ETNQQW0tOfSJlh2qz4NHvwETvvkh3BRToK8xArjn0llV7DmzSfdNsjgIUIbFQ9pylZtd2rl9Q== 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=id8drXIjQKWgY79ZYEm1n/V1SxQyuWwMAkmM0iCkRlk=; b=cP2gYbmk+Qjzkt972b3oVRNNQjFtLU8nnI8dKTyhQ/ilw1kRrxkImP2+06MdvKLgwMgUieqJ2mYG0Wzl/Jfxz/Ir2k7zwvVbKkxG8kTbi6B0l8J5JWrNc9LnssriN6ZqOEbTFo1iPyHI5thup/oNN0jdB2XpnahkxoVyarwrxytxaXhO0qFTghijoqKsP7rKuw0U/QpWANQdanQkQ3aXNuyeU5CVfD3YYZj8TJ+3mu4ZorsSVdGFTeqMZKW+svO2NsbHeJhr20+Jgo0bdta6X09HNUOl6wzldpuHBAcv12bHt4wHmsGJ53DEbL1e6y9wK24wweE+2aCppRpdq2hEhw== 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 DM4PR11MB6020.namprd11.prod.outlook.com (2603:10b6:8:61::19) by PH7PR11MB6930.namprd11.prod.outlook.com (2603:10b6:510:205::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.360.7; Tue, 25 Aug 2026 16:11:38 +0000 Received: from DM4PR11MB6020.namprd11.prod.outlook.com ([fe80::3058:1480:e4ac:5765]) by DM4PR11MB6020.namprd11.prod.outlook.com ([fe80::3058:1480:e4ac:5765%4]) with mapi id 15.21.0360.005; Tue, 25 Aug 2026 16:11:38 +0000 Message-ID: <7cb2f870-1358-467e-9406-80ec41d8a8c0@intel.com> Date: Wed, 26 Aug 2026 00:11:28 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 9/9] x86/resctrl: Add MMIO-based LLC occupancy monitoring support To: Reinette Chatre CC: , , , , , , , , , , References: <9c33a763-e39f-45e1-a6b7-297dc79263f7@intel.com> Content-Language: en-US From: "Chen, Yu C" In-Reply-To: <9c33a763-e39f-45e1-a6b7-297dc79263f7@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: KL1PR0401CA0026.apcprd04.prod.outlook.com (2603:1096:820:e::13) To DM4PR11MB6020.namprd11.prod.outlook.com (2603:10b6:8:61::19) 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: DM4PR11MB6020:EE_|PH7PR11MB6930:EE_ X-MS-Office365-Filtering-Correlation-Id: 8bdd2b53-bf19-465e-2aba-08df02c38aa1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|7416014|376014|23010399003|18002099003|22082099003|10067099003|56012099006|4143699003|11063799006|6133799003; X-Microsoft-Antispam-Message-Info: aO/snAQ2fJHql5dddeL+aOmfkmHjfqxIODFe2WxtQn+ai87Q5ZstXZEpjPSbtBQjuQpLGL52BjZvPbi3/iCtUN4C2GONv6o0NsVnWP36fuYJN92P132DTWtgXn25wBWsxr5327YMk4/pxXcLFkZDa5BMPQO1qZHoiUN0245xcZzIQnHcxdbt4Sf3yLwtmSBeI6aez8S3dhzt434aqTVjEuJHWytS+soPCr7X2MeGoRw+Diaja3y4KW4m7Q7rvdjYdgo033XMBj9TMnf4e0Gt1x+rZ+BWp+X+bCJRoYTQXdDRTD47AMHTq5yANu3WpZgF9biwIajuN96QYM40lllIPBEYiFYk4lI8heTkgR6EgTTFVwORgJkbEbHow3Z1qF6LpBu2JqM5ACAC3FqVSHp+iF7KpQcmCaoZmeeO+ES2YjtTergAFjtCyFZ1PtMQdV2tY3tI7tLWL70mO2VbpiE5T/1Sd4AlXRexVTOxGzI0g8j6pPTivttsmQSJledvLOC9eZSo1E7A8Yu/82Fp8gHcGxPDG2BS2PRDUM/4DQRNDB83s6jL1EAE/PcrTbMsnNxP5LHOs73nIuTaKTQau8F58XTs4ArYZ8G/v+d5HVomhGR+7HD7SZnfTQ3r3Ekuo/WwNj7gbEAb4Uc3zjubDzNDBzCotfqaJS1QcPsfUD8w9eY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR11MB6020.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(7416014)(376014)(23010399003)(18002099003)(22082099003)(10067099003)(56012099006)(4143699003)(11063799006)(6133799003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dEtGaDRjbUtZeDl0QzkzS21OejQybG9WcDBxRzNRMUlyMmxOUGl0RFlGcWRm?= =?utf-8?B?c2NPR215R1psUHJiK0JENzUvTk1xaS84ZGk1dzZUb3ZzSklWTE1raTdzZmt3?= =?utf-8?B?MkNqNzBndmk0RDFJMzN0UTdqSi9Bdk52N21PNFVMbmlnZEJFaWMyaENmVjJY?= =?utf-8?B?a29oOWFwZmJwQ1Z4VGo1YVI1YnhVSWJ5VkFLZERpL0xiRDE0SmJEYlVkdkVQ?= =?utf-8?B?KzFqV0Z1dlhuckZWVGl5N1B5bkI5bDlkYnNSVitwb3BxYjRCNUZvMC94RENJ?= =?utf-8?B?Y3FMSjI3bk9MU3R0bVpWMHQ0OXJSRjN3V1ZhbDU0b2FIUWMrWFY0VDN4alB6?= =?utf-8?B?QVBDMUNSeWpvcE5yQ05YUkRYQzhxU3d3cGZGcG55aERGTnR6eEVEaVYwZ1hT?= =?utf-8?B?ZkZCYVlYMzdIRXNJU0diaFN4TTlyMHZKbkRqL1U4aUVFbU82eW12S0RLVkNy?= =?utf-8?B?cEFyd2MzUndyWm96UFNmcm5GaWxjdTlUL0Y0RjQycUM4NmFxSnJkb2V0Q1Ez?= =?utf-8?B?MVpxNnI5WDJWbXBLZWx1K0dxOHJmYWZrb0pINFFJbm0yVXQvb0JHY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utpATrWJV9wWJdtxJdrUWeNL/4xC2g2oNXoILQlVucZ1mNzIDR4B2ZA0Kao0RhIgET61twGMhviCsbnau+LygusI3E6wz/sbyMlBScnaYlaIgLj7Wi58QllK3Iekv0mfdqDsT7BE1fOssE8242ExgAH8prZSDiITklhD9MKgghDdpHg9UW62QYD2NCf2TuPifbKBaL1QANExHS+oHzuVlZiNFCPZUCzv9Ma4nEBl0GazZ1xokYTeGYbroxKoaRcrfWdkw0iYgtyQSbR3VsTzprAsn7qfuTgM2/iVzwsuCOBjWEEMvBOFJun1WmshllY4NAYg== X-MS-Exchange-CrossTenant-Network-Message-Id: 8bdd2b53-bf19-465e-2aba-08df02c38aa1 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6020.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2026 16:11:38.0905 (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: fym6uX9ZEKCjvIi+SrNPzBjZBhuMl74k8w9xTSqrIa4NS0le5/HuZdIkjdsCBD5nFGlWnt5xVNfCrDR905cj3Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6930 X-OriginatorOrg: intel.com Hi Reinette, On 8/20/2026 7:10 AM, Reinette Chatre wrote: > Hi Chenyu, > > On 7/25/26 2:23 AM, Chen Yu wrote: >> Add erdt_mon_read() to read LLC occupancy via MMIO and use it when >> the platform supports ERDT. Register the L3 occupancy event with >> ERDT enabled when available, falling back to the MSR-based path >> otherwise. >> >> Use the CMRC (Cache Monitoring Registers for CPU Agents Description) >> ACPI sub-table to read LLC occupancy counters for each RMID via MMIO >> when ERDT is enabled. This CMRC information is stored in the >> rdt_hw_l3_mon_domain, which could be accessed directly. > > Please write in imperative tone. > OK, let me try to rewrite it(I suppose you were refereeing to: This CMRC information is stored -> Store the CMRC information) >> >> Currently, the per-domain limbo handler is still in use. There is no need >> to switch to a global limbo handler, because even after such a switch, the >> worker thread would still have to iterate through all domains one by one. >> The per-domain handler already accomplishes this using a worker thread rather >> than costly IPIs, so there is no clear benefit to switching to a global handler. > > Could you please elaborate how a global limbo handler would require IPIs? > The global limbo handler does not require IPIs. Previously, I wondered what the benefit would be of switching from a per-domain limbo handler to a global one. per-domain handler: N workers, each worker calculates the current occupancy of that domain for a rmid. If the occupancy of all the domains drops below the threshold, recycle that rmid. No IPI involved. global handler: One worker iterates over every domain. If the occupancy of all domains drops below the threshold, it recycles the RMID - with no IPI involved. For both the per-domain and the global handler, no IPI is involved, and we still have to iterate over every domain. So it seems that there is not much benefit in switching to the global handler, IIUC. >> diff --git a/arch/x86/include/asm/resctrl.h b/arch/x86/include/asm/resctrl.h >> index 5491853113dd..0948f64856ef 100644 >> --- a/arch/x86/include/asm/resctrl.h >> +++ b/arch/x86/include/asm/resctrl.h >> @@ -132,7 +132,13 @@ static inline void __resctrl_sched_in(struct task_struct *tsk) >> >> static inline unsigned int resctrl_arch_round_mon_val(unsigned int val) >> { >> - unsigned int scale = boot_cpu_data.x86_cache_occ_scale; >> + unsigned int scale = boot_cpu_data.x86_cache_occ_scale, escale; > > related to earlier topic, "scale" being unsigned int is ok since > x86_cache_occ_scale is initialized from 32bits. As I understand it the > ERDT scale value is initialized from 64 bits instead so the existing > types do not seem to accommodate? > As you mentioned in another thread, there seems to be an inconsistency in the spec, I'll check with the team. >> >> @@ -39,6 +43,9 @@ static int erdt_scale; >> >> bool erdt_support(int flag) >> { >> + if (flag == X86_FEATURE_CQM_OCCUP_LLC) >> + return valid_subtbl_mask & BIT(ACPI_ERDT_TYPE_CMRC); >> + > > Is the plan to keep adding more if() statements as new flags need to be tested? > > Yes. For example, to also support MBM: if (flag == X86_FEATURE_CQM_OCCUP_LLC) return valid_subtbl_mask & BIT(ACPI_ERDT_TYPE_CMRC); if (flag == X86_FEATURE_CQM_MBM_TOTAL) return valid_subtbl_mask & BIT(ACPI_ERDT_TYPE_MMRC); return false; } >> @@ -430,12 +434,15 @@ int __init rdt_get_l3_mon_config(struct rdt_resource *r) >> struct rdt_hw_resource *hw_res = resctrl_to_arch_res(r); >> unsigned int threshold; >> u32 eax, ebx, ecx, edx; >> + int max_rmid; >> >> snc_nodes_per_l3_cache = snc_get_config(); >> >> + max_rmid = erdt_cpu_has(X86_FEATURE_CQM_OCCUP_LLC) ? >> + erdt_get_max_rmid() : boot_cpu_data.x86_cache_max_rmid; > > This does not look right. Wouldn't this use the ERDT supported RMID for the MBM events also > even though they are read via MSR? > Got it, this is a bug that might impact the MBM. Let me use min() to get the minimal rmid between the erdt and the legacy one. >> resctrl_rmid_realloc_limit = boot_cpu_data.x86_cache_size * 1024; >> hw_res->mon_scale = boot_cpu_data.x86_cache_occ_scale / snc_nodes_per_l3_cache; > > Should the scale used by ERDT also be adjusted when SNC enabled? > My understanding is that the reason hw_res->mon_scale is divided by snc_nodes_per_l3_cache is that one LLC is composed of several SNC nodes. Therefore, when we sum up the monitor data from all SNC domains, we need to scale down mon_scale per domain to avoid "over-counting". For the platform on which we are enabling MMIO-based CMT, I am not sure whether SNC will be supported. But we can still adjust the scale for each SNC configuration to ensure future compatibility. Let me change the code. thanks, Chenyu