From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 9615634BA50 for ; Tue, 23 Jun 2026 11:43:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.11 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782215010; cv=fail; b=Fn8j7IlgJ/hc0F4UMsqVtWU8LpHwlI//YUIE/rl8XnPpUbkxfECxY0vsAmIdVtBixAm7Zjq+40XUCEKdVbiT6YuTKAFWDvGRSOeUu3aiEMQlCE3xr3lw8mhuBPReFtJfY33JOMkHded38fu6+S7vz0d/TssBy/R0J0SfIBozCHs= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782215010; c=relaxed/simple; bh=w0a9AU4CBJbUNRVrxyT5s99kfPU+sL3VehHNqQ/iwlM=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=p8E6Kdx+R5EsoYyOkubZE7ooSAI6ha3FlHn3QsPnv7UUfnMmKQQyEPHQH+Jz0SuoSXgAh6VtQLk8ADF/Zh0kL0f4Ck1kHA3I1B2pQejjnRB1QNE0yhSZEHRdPY/nsWxUJ+/rbYEz1LI4QCY4+5wPR6aMxk4XxJbz6VgWi1LZ50U= 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=UOUYWhwP; arc=fail smtp.client-ip=198.175.65.11 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="UOUYWhwP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1782215009; x=1813751009; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=w0a9AU4CBJbUNRVrxyT5s99kfPU+sL3VehHNqQ/iwlM=; b=UOUYWhwP7V3Vrj/uhTdd19JgEQ2g2eMVH3UzdaGEcEtLttgB2pjWZ7f3 Q4supuFTpPr0EBU/rmd6YQ+R+WCok5pS1+fEHBJhX7zkj52x9tbCwd3ua gKFxIau7/bywYBp6aYck/95fI24uXMdndc9zoj9R08INzTEuF3jB40yfu JRGtM6LJujtzPbqiQ2ZOhR/O9VqPkRMpwCxbr0BvrwKaeDBRKmV/MdFG9 eotFg8OpcSTMCoq4DwXTwTPaHXdWfOqcnXVZxmnkSBuWfj0byiN44sqxS LfRjLFJJCQXa8zevphd/SuZ9hcCzQEmRh4y1sRk6pLkKZ+OeB437ENsWr g==; X-CSE-ConnectionGUID: okW53jfVSS62567Ri30Z/g== X-CSE-MsgGUID: uhz1C3wOSFKd6wuhIF4wBA== X-IronPort-AV: E=McAfee;i="6800,10657,11825"; a="93319931" X-IronPort-AV: E=Sophos;i="6.24,220,1774335600"; d="scan'208";a="93319931" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2026 04:43:28 -0700 X-CSE-ConnectionGUID: UyuhF8dIROqraubbjDyqKg== X-CSE-MsgGUID: ovzPxfQZRZGFohHSyZ7rpQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,220,1774335600"; d="scan'208";a="246574352" Received: from fmsmsx901.amr.corp.intel.com ([10.18.126.90]) by fmviesa007.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2026 04:43:28 -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.37; Tue, 23 Jun 2026 04:43:27 -0700 Received: from fmsedg902.ED.cps.intel.com (10.1.192.144) 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.37 via Frontend Transport; Tue, 23 Jun 2026 04:43:27 -0700 Received: from BL2PR02CU003.outbound.protection.outlook.com (52.101.52.51) by edgegateway.intel.com (192.55.55.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.37; Tue, 23 Jun 2026 04:43:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QG2u92XwcGkFvzMXrctqcypQKoeMWu0AKU5D9+muN9B4tFPhM7Cu1RnybjH94qSu5BMJeqF0koLQfN920AyPBS1gjYJmVpI3AQP6AmrCLWRumzvE+mGldQWtJ10bOPNQT8Vd39lVcxRSogCU1frKrOguI/eJ/nWWHS6xlpzmf2LFbBAGjdLXq7DoLMXpeXg3pimSP2/oz0Ny473/OoYg8x2i2nUcwcyEQF9S4sZY89jkmT3EwbkU/Rkv5VJBraLZIWL9n8vWpe9EBnbvdroGZy2OkPtCRoE6kG+a2QMaq533DX2FwFO0i1q29o/jI8+G/EiGI2J8JMBO8xzHPgrGCg== 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=FW1xW1dDe+7EaVp80dXhHdQipXRHEnenTpZlnxV/fec=; b=nkdLbrH421qWCRAevMiDz4MJKjwanydZg1n2qOOGalDBzFNfrmlSo+mqe06hZUvuj0h1CatDVfZQ7DjpIPQfVXNuVSU3qhJbbZcBP5GTC4eXQ91owXr6QOwuqcAHPe/UyONzKAMCVviWqLfDJg7wlO3E4bxLAEOpYP6pO4EPEco0XnuAfnohlAzB5TWj7WulLDQ+2QuU2WOHmdJGOX8SsEqYEunLaIDu/MarU94R0/fM5D4iBDGlAvJwCHaDQYnvbMSS5YlAAZD8S8d8hr6wjmKmKIJfc8yshSq/gorDlZEIGJ738CgbeIyJNPj8NuyxOG63C6Plr77YtkYVJXNG4g== 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 DS7PR11MB6152.namprd11.prod.outlook.com (2603:10b6:8:9b::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.139.18; Tue, 23 Jun 2026 11:43:22 +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.0139.009; Tue, 23 Jun 2026 11:43:22 +0000 Message-ID: <2835922f-d2b7-45dc-92e3-c6aed4e79fe9@intel.com> Date: Tue, 23 Jun 2026 19:43:13 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/6] x86/resctrl: Parse ACPI ERDT table and map RMDD domains by L3 cache ID To: Reinette Chatre CC: , , , , , , , , , , , , , Chen Yu References: <807a91c2b6235f85e2d19d4293c17e53a8cc69b2.1781332698.git.yu.c.chen@intel.com> <288153df-307a-40e3-96e1-ff4ae8f6bc5a@intel.com> Content-Language: en-US From: "Chen, Yu C" In-Reply-To: <288153df-307a-40e3-96e1-ff4ae8f6bc5a@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: TP0P295CA0017.TWNP295.PROD.OUTLOOK.COM (2603:1096:910:5::11) 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_|DS7PR11MB6152:EE_ X-MS-Office365-Filtering-Correlation-Id: e6cb3623-68e0-4530-a39d-08ded11ca0f3 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|7416014|23010399003|366016|376014|22082099003|18002099003|6133799003|4143699003|56012099006|3023799007|11063799006; X-Microsoft-Antispam-Message-Info: Y6LhuRobhGctOvK6Y8aPPw1iQBT1+g4AoHdfHd24G9o5b2ZPgsWgrBYA4ojbk11U3n6X7o88mEW7nCzp126EXVhNQY3Knm1t3N3XXsM2T6w91zErSUN+vpPzcq+4OAIsOeTsZ3/zaLvyi/0kYrz+tkkvtkB0S8NP1fksZIaSIezFs7Wc1zUm2p2EFUABVm8IL14vdqNwYgKnoFn/G2YxZIj6DIOCp12VLtaBnrolV8eZ491uM/mTban12ksVOEf6FYd+LSdmMjH/DNGl4SB+ckx85Kos+ZQ6t6loJUxiQ093g2K37vjq3liccmVCQtCDUf2g/2KGwhRahO1muOJApBuTwghb5VaKY8jBYxHpDpBWQJEeTY1gAaAw/vclzJ42RWlUgmjt0ERu9Hv31PqTMsXV2nrxhhenp/Uy2wybRaC4weNCCcs7Qrm3W/QvJ6q9U0pht691Dihsr1jpCuK1rf2FfRWcBU3+k0Cmw/1wejGU3G6xS7kVviK+51PUVygV+g54Wejs/K/3DgVoUDgVpf+OiVcqfXdpMSL+N6f+uQx6RIg8q0hNEfUJGv2cZEfhQk26vxVuGNuXmZf44GIx1E/DyqYcWE79yc9MFFViP1ZIIY1HzhPbQ2TFoNXMz9EJf11wjeKGzV5fIp73chrdApqifyzXJcjkiS1R8QC5l5g= 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)(7416014)(23010399003)(366016)(376014)(22082099003)(18002099003)(6133799003)(4143699003)(56012099006)(3023799007)(11063799006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?L1NBdGhEeTlPZ2poMjRPa053UUI1OVhVWlZweWY2VEtQKy9hR2VFTGpwT0RO?= =?utf-8?B?cnk5L1poSXhOK25KS2NIb00zaUpsUTR2dDFZNnpxWU5HRTVaUVRaWHRvcWhW?= =?utf-8?B?azNFMVZNNTNOMVNpSkNSM242NHZBdXV0YVIrVjlYSElqcEJJQXdDVGRCcHhT?= =?utf-8?B?eTU2WnYyZ0NseGFOUzluNGFIV1JybG10U0hWOXBIL2FZT21BdnI4eXFNY3BJ?= =?utf-8?B?MDlwdW5qWTMrTndaci9tUlgzMDZHMHk5MHArZ3luQSs3VDhwZ1JYalJwYy9o?= =?utf-8?B?eEZrbmc4N05SNmFmMzFlTzNCc2xtTUpXY2lrVlFEOGlyTDg4Sk0yYVVRU3l0?= =?utf-8?B?dlZHV2lhVVhaSEN6SU5ZU3pvRW9wRDMvUVVCc090ZUZpY2g1UlpzVjMzRjRQ?= =?utf-8?B?MmRDVm5xUkIvQStMUDN5TGVGQTNKck81VlhEcmlaYy9yUFlYRGpLOUhUUDQ0?= =?utf-8?B?cWs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cG5PMjFJU1JWSzVZSXFHdmVrRUJaZkNQ?= =?utf-8?B?THFqMmpycnVJakxRNXpNK3FMa2JqRTVHT0pHbEloYURLdGgwS0lJQT09?= X-Exchange-RoutingPolicyChecked: ImNZSzuP7X4v5Sc6E1Ktz55oWZ7LKn6Elj2yqej9uVHShVL8jN/IRJ0z4LIg/JZdlGrCCJuAOY/PACEUh8BZj5HoGZrVMsPyV4SYHbFWxSsSVurC/+GiG/OXNiqYiJbE7vbKOjm5FmmgVOluRdaklwkPDtgHC8+wkHbWwqGr5LohNNponBrpWZimqULWI4rPwkhM4y7q5ngZ8D6s3q1MnbN5r62aCII3FS7CE6PxKgOhIQ3XnlC/GzBUOINdcQwS8OsfxVcYC+87Yz7ypVYEa5jBUZ8OmIF37v0zuu1GCeIwof9VEm4BWCAQYnO9OKc1sef/actMd5xqRuGJuwIKSA== X-MS-Exchange-CrossTenant-Network-Message-Id: e6cb3623-68e0-4530-a39d-08ded11ca0f3 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6020.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2026 11:43:22.4323 (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: cYCOo52JyvvaDH6r7nc6Hj85Y1Hq1AbWuS6S9ziJZOysP6NsGfK+gaxPBiaVzpccyxqVhJdmzfASlXSL8IdHzA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB6152 X-OriginatorOrg: intel.com On 6/23/2026 2:29 PM, Chen, Yu C wrote: >>>>   From what I can tell it is tmp that is essentially returned by >>>> this function and it >>>> is the result of get_cpu_cacheinfo_id() that returns the cache ID >>>> initialized from >>>> CPUID leaf 0x4 ... the function name ("get_l3_cache_id_from_cacd()") >>>> and function comment >>>> "Resolve L3 cache ID from CACD subtable" implies differently and the >>>> way this is done >>>> makes me wonder why CACD needs to be parsed at all. >>>> >>>> resctrl already has a hotplug handler and it dynamically determines >>>> the domain ID >>>> based on the cache ID returned from get_cpu_cacheinfo_id(). If the >>>> domain ID used by the >>>> new ERDT tables can be, as it appears is done here, trusted to what >>>> Linux already >>>> treating as domain ID then why is it needed to parse CACD at all? >>>> Why not just >>>> pick the domain ID from RMDD directly and use it directly as domain ID? >>>> >>>> Later the domain ID from RMDD is just used in error messages ... >>>> never actually used >>>> as a domain ID to guide the implementation so the correlation >>>> appears to be implicit with >>>> this CACD parsing not intuitive. >>>> >>> >>> You are right that the cache ID ultimately comes from >>> get_cpu_cacheinfo_id(), >>> not from CACD directly - the function name is misleading and should >>> be improved. >>> >>> However, my understanding is that CACD parsing acts as the bridge >>> between ACPI's >>> RMDD domain namespace and the kernel's L3 domain ID: CACD enumerates >>> which CPUs >>> belong to each RMDD, and from those CPUs we derive the kernel-side L3 >>> cache ID. >>> The specification defines an RMDD DomainID as an identifier unique >>> within the >>> ERDT table, yet it does not guarantee that this ID matches the >>> kernel’s cache ID >>> obtained via CPUID leaf 0x4. For this reason, we omitted the RMDD >>> domain ID in >>> the current release. >> >> get_l3_cache_id_from_cacd() implies a straightforward query and the >> function >> comments supports this. At the same time the function includes what >> appears to be >> sanity checks but from what you say turns out to be essential >> enforcement of the >> RMDD to CPUID leaf 0x4 mapping. Is this correct? As sanity checks >> these additional >> checks are ok but as RMDD to CPUID leaf 0x4 mapping enforcement I find >> them inadequate >> because its correctness requires all CPUs of all domains to be online >> which cannot be >> guaranteed when this initialization runs. >> >> Consider for example a scenario where RMDD and CPUID do not agree on >> which CPUs form >> part of a domain. If only one CPU of this RMDD domain is online at the >> time this >> initialization is done then the mismatch will never be noticed and >> resctrl will just >> silently use the CPUID mapping, no? >> > > I suppose you are referring to the following scenario: > CACD says CPUs {0,1,2,3} belong to RMDD-A, and CPUID says > CPUs {0,1} share L3-X while CPUs {2,3} share L3-Y (a mismatch). > If only CPU 0 is brought online: > > get_l3_cache_id_from_cacd() iterates CACD's X2APIC list: {0,1,2,3} > CPU 1, 2, 3 are offline -> skipped > CPU 0 is online -> cache_id = get_cpu_cacheinfo_id(0) = L3-X, > all passed. > > Then later CPU2 is online, resctrl's hotplug creates domain L3-Y. > But the xarray has no entry for L3-Y, so erdt_mon_read() will return > -EIO for that domain. > > If this is the case, I wonder if we could run the sanity check during > CPU hotplug to reparse the CACD table whenever a CPU comes online. My > thought would be to call get_l3_cache_id_from_cacd() within > resctrl_arch_online_cpu(). > In fact, parsing the CACD table during CPU hotplug may not be feasible, as the ACPI tables could have already been released. We could instead perform the check directly against the erdt_domain_xa xarray. If a mismatch is detected, disable ERDT and fall back to legacy MSR-based access: /* Called from resctrl_arch_online_cpu() */ void erdt_verify_cpu_domain(int cpu) { int cache_id; if (!__erdt_enabled) return; cache_id = get_cpu_cacheinfo_id(cpu, RESCTRL_L3_CACHE); if (cache_id < 0) return; if (!xa_load(&erdt_domain_xa, cache_id)) { pr_warn(FW_BUG "CPU%d L3 domain %d not described by ERDT, disabling ERDT\n", cpu, cache_id); __erdt_enabled = false; } } thanks, Chenyu