From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=192.198.163.7 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796354832; b=2rdS5nVFStWsSBLGB4T4+8FjJ98qAPWk3b+9+SQyNQ0QyWxANJ4SuY/GQGfu3iIqwpQR eLnqV97PtR4aYIXlUcDADidqY+zE76a8eJN84Y+NDn7J79vOWOnEEvydz3uVHWD25RbV3 267+t6KbF/HiNrJVyanYeiVVL70FkZgPZopjWSWwlHS2oZvL+K60RRZpJMNV3Wm2CYJ5r LpReg1pNERLH+WlU1a1p3ROhpsMXhI1Pl2c0eBCKn/wdSUwZc6AozaURrbo9UrDwt5c0B laObOb8r7g2KfGnMenw6AgBDvnTY+l6ge8CgMmk8mLaZ9BAjB9X41TRa1or65AzfoOQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796354832; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Received: Received:Received:Received:Date:From:To:CC:Subject:Message-ID: References:Content-Type:Content-Disposition:In-Reply-To: X-ClientProxiedBy:MIME-Version:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-Exchange-RoutingPolicyChecked: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; bh=eKh0HP3kBPv2oQvQSAE4jY2Iuoe5g0wGGW39JZ3rT3Q=; b=ZfLcBfKwY2zaD2BhV/HJhRCGyYJs0aNKJObGLaqvHIff27AYisqY6elqGvXf8NNfLkyb YH9s0zTS2fofQcNamRLtdKtwCz2DTyaNzGuQkDMHt7ds6ivFoSaGIW+J81iBDXaIQen5U v51A934rxfHz4q8wWsSq2ti3ehTJOuV41W30eiEGXpzH+ab5YvT8DapTStIXpKj0M8fIT ovrEU66l0w1miBVHfGWtsyHJRIlpR5rP2XmSm03RIL2m3i+COhWnsSCVHQjgE/2xcTtt+ X2QvzJZU/SxfmmV9DvLcfMMRyn8+yS28kzZ7UpV9IBj+2xHMtZX9XIDB5N0GiDqtyBg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=O9KwlLmQ; arc=pass header.oldest-pass=0 smtp.remote-ip=192.198.163.7 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2D6D606A32C for ; Fri, 4 Dec 2026 03:27:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C2D6D606A32C 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.a=rsa-sha256 header.s=Intel header.b=O9KwlLmQ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796354832; x=1827890832; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=eKh0HP3kBPv2oQvQSAE4jY2Iuoe5g0wGGW39JZ3rT3Q=; b=O9KwlLmQv7XclrVJY/37dgXEqNtDHMc3BpJl0cavDmQ/RvpE3jr1XSdO fiZGyja5FO7uVKjv++TnLfk5bnJBNPH/j1Tm9JByjJMpZZ7qaCBAh98Bh uGBlwMJvQeA6Hakes/UnC8xVL7wB6L0AXpA/Kz2tCA32DEOpt1CHVvByW JJU18AI00+mZvV2wfMUPkm37/Q9hZ7rbqRq6JLHkXBbIZqfgFGD11+F7C JZnV8rxN2BDuIjglaWsXco8i+Nm+8dx8K1KjfHBiDrLDgKzFsxhnEtLmA lVqyuOmHi9js2y8UWC7Xltza4udozPPpIG0CQaiPtfdd1Cnmzi9Q7hgd5 A==; X-CSE-ConnectionGUID: +HpGZNveQRSzV4rxwutc7Q== X-CSE-MsgGUID: IQMHnIYWSySG9gY0ZwEaIg== X-IronPort-AV: E=McAfee;i="6800,10657,11985"; a="5186090" X-IronPort-AV: E=Sophos;i="6.29,77,1794902400"; d="scan'208";a="5186090" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 19:27:11 -0800 X-CSE-ConnectionGUID: sMk2jvMAQTi/a1vqczZ/ww== X-CSE-MsgGUID: 12iop1ATQHOWggLdRA+9Tg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,77,1794902400"; d="scan'208";a="14005494" Received: from orsmsx901.amr.corp.intel.com ([10.22.229.23]) by orviesa007.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 19:27:11 -0800 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.57; Thu, 3 Dec 2026 19:27:10 -0800 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.57 via Frontend Transport; Thu, 3 Dec 2026 19:27:10 -0800 Received: from PH8PR06CU001.outbound.protection.outlook.com (40.107.209.70) 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.57; Thu, 3 Dec 2026 19:27:10 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dKxAICg2A5DwK7kSsy8lYQlp+XMNUxP+SfPgCk9JZ5qPd0hbGfK0xtcvz94bO3sJJ+37d9bBenYnMK1rVqFsGBe7qNGv0zaPmrCMCc4WVzYWN8ESQCqQsXE2yOqehDLD7JhTKWMICYYZMJFD0IgR//o2s//Hzd7SRNHFLkP1j9KeEqCvp1lRVcX+SQqMfrMLVRj30iJa9HDIOsXb1QjE5pyjUNy/rYXEKYQk4wXvy9Xjq1F+b4xEuWaMs7y+Y8gL9wB/yGywcIzrFhhEDmWx40xCqVQ6KYe8GahGGSbVxWXqRQ6ajXjhiV8v+G2ouDYi810+l/qZ5ePMIJvx2znxlw== 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=eKh0HP3kBPv2oQvQSAE4jY2Iuoe5g0wGGW39JZ3rT3Q=; b=c4PspwmgxNXu4qpw7MHonE2HBZUpM7bOKLoL9VdL/kY6oWKeVhaVvXt8CzvPoXngd1uiliOB8sYtjCcfx1+JXBNS7uGsE/VDyuM4WwQuZNttgPdRzKX3eB0T/ZTn8EqBlcp82X2TELhqp9JD79xOjyc0IZMo/PBL+HdP6AJIa2XReww70XYpgcYXp2Msepv3BgnrMa3ibL7ByUe66hKLTiSHXaiTaQOvoVDKfcC+wWkbwWaGpC9b7JzwmcXBHOVZuUu/XrejcnwtHWitgJKlkk2tWh4z1yCj33UpfVi8ZcCsgV7KELKVQsXH7VpxTEolUET6y3IS03vbqgd+0OyPqw== 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 DM4PR11MB6020.namprd11.prod.outlook.com (2603:10b6:8:61::19) by DS0PR11MB7578.namprd11.prod.outlook.com (2603:10b6:8:141::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.12; Fri, 4 Dec 2026 03:27:07 +0000 Received: from DM4PR11MB6020.namprd11.prod.outlook.com ([fe80::3058:1480:e4ac:5765]) by DM4PR11MB6020.namprd11.prod.outlook.com ([fe80::3058:1480:e4ac:5765%3]) with mapi id 15.21.0688.011; Fri, 4 Dec 2026 03:27:06 +0000 Date: Fri, 4 Dec 2026 11:16:06 +0800 From: Chen Yu To: Reinette Chatre CC: , , , , , , , , , , , Subject: Re: [PATCH v10 05/12] x86/resctrl: Parse ACPI ERDT table and save CACD cpumask per RMD Message-ID: References: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: SI1PR02CA0009.apcprd02.prod.outlook.com (2603:1096:4:1f7::10) To DM4PR11MB6020.namprd11.prod.outlook.com (2603:10b6:8:61::19) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB6020:EE_|DS0PR11MB7578:EE_ X-MS-Office365-Filtering-Correlation-Id: fecc78e4-508b-4438-1c3a-08df51b67872 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|1800799024|366016|7416014|376014|261028144727099003|261026121527099003|261102123227099003|261022105027099003|261022075727099003|261026140227099003|261021123027099003|261021121427099003|4143699003|5023799004|11063799006|56012099006|10067099003|22082099003|18002099003|6133799003|261009223027099003|3023799007; X-Microsoft-Antispam-Message-Info: PbpSUGrBh4xbY5dwra5E2qSw8SzoYJkdQcIUmkJYgmwHuzsRR00T8uqjnJeHy29I50krDIcWo+XeEX/LDj1ke8X53fG4LjmJNn6zKvBQf2ZEPu9+rB0csI0mb3SY6REFPWuDrWszZMOx4iKDjfkv0calw/xEVnc0pD3c58gM7W90c2GjJi0e6jB6lIAvYliLDf/oTBICVW3QXweXsd+uggZkZ5RpBixkooRmMjg/05iuuDZuQk5i4a53W/WbDo0ifAQCKlhOnkhmnijeGde6B69xRfcQCnsEcTjhhggWJ8Tptzw2spI6NqtznOoSqA20qQ1IHqEUKsY3Io0TsZntW0WRFPB4HU7cTRtuEU0nyped831MzWUKLKbyTu9yKHEmlCEUiRe9J/ea3pQYHZFaTD7pJGMFRfVYkuevl4hdzWy48WVfIdt6w/9hb6kNR2ol65Wj94k3YaFIQCIOm7aVs6mwzKFKwtINkASwuRP1zj3zqzg1cyqDDCJZ/7o9kw14qyiQ1d04EIL7FgCqWE9IFT9tfilu6BkYRpXxpWdKPTuKNnvWSpBx3DA47YhH2g4ct8W+egYVNbgZXWCuT9NT6vpq/ZEdhmH2KfTFsDVA21Q0p1UBJv4T03qkDlki2a6AkGh86gi7D7lJmQzLZUyR1949vES3kWdZhgot36HZa70= 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)(23010399003)(1800799024)(366016)(7416014)(376014)(261028144727099003)(261026121527099003)(261102123227099003)(261022105027099003)(261022075727099003)(261026140227099003)(261021123027099003)(261021121427099003)(4143699003)(5023799004)(11063799006)(56012099006)(10067099003)(22082099003)(18002099003)(6133799003)(261009223027099003)(3023799007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?cO6pY/w6n1ZJztSTEMF6M2dypPVcCb7tIMXvcecCA5ttIPNCqq5ThAFV0R+S?= =?us-ascii?Q?IrtEoFQ2cHuPEzroGEtUUWtU6aNHM34n9Xd6enIIKzrl5FQcMggthte1pqnV?= =?us-ascii?Q?INaguHtRaLB3cnjwpIClebtaGVgqMc6/uMKg9SDheKnbSUrs4SiwJvArnDQ3?= =?us-ascii?Q?gs92Eu0nGPnE7+X98xRbkRFAay97tCiOKcjjDfb3/CH5nd+nRXXbe1R8vxxQ?= =?us-ascii?Q?G9sU5UlfWt6+fEY33DsqnD4uAiix1j80IVrW5P0byx+b/V7T4f9uzWoD1eIu?= =?us-ascii?Q?00rxIgLrE6ri0bGlO4gZfvtiZ6eFy10SRD6MatmUCT2VEKl+0VeY2zl2qByg?= =?us-ascii?Q?Xt8p8NPC6xHSI2zOEZAhusbbbJlZ0wVVVVKQlzgFNyXvGWXcjnSHTenRwa7R?= =?us-ascii?Q?YzDthflkv/6382hDjqBmFtvZrmsggD66RV6jnZLPBO1UxJ9aGXzAG63vHaKr?= =?us-ascii?Q?C93Vqn3Rh0NSuB3GF2DpLFSE/nga9u3FvrcVQvrvj4ifQ7WOfu7e5duXlFuU?= =?us-ascii?Q?HuLKO1NM3z65fXRvVg0SaYeY0zEGRTlEU+/CiDYu7L0xEodia8sPo2LD1pkO?= =?us-ascii?Q?1CQVKqgvpvUTyOsXilq2Mbom+18IEvs9FMOx2YQmjRLVZlJUatYKVGh7gnXq?= =?us-ascii?Q?R9RStpuCBjc64p6YvUCOJJwZu6FqkNnhxtEOeVwRMK2Oqk3xdKRtcj3lAu65?= =?us-ascii?Q?dD/9p0F+ToqcJl+AVJ67L8slcM116nrHzHNGIf48oI8qEuDQrVmVn5udtVnZ?= =?us-ascii?Q?O00l6TcvzbPJgniguf1tYSlhkk5HbjmD7IFOpqh0t0RsSq6NfkI60hMnN205?= =?us-ascii?Q?hqu/0ScN0qNjHDupIPVELAHCYUa/EjC0jxKwkQIPOABZNv3LRxEbOOt40VE/?= =?us-ascii?Q?k41qEveD0lasb8Ao7Uf1ppPoaiPToadRvvISI/EE0bnb2k1+VC4lBV4f+KFW?= =?us-ascii?Q?9MNwHmhY8A29lhvaPuc0FY/IgHzhqJP0qkP3mQw1Ox4gyBT9Z5aXA6JVI4ZF?= =?us-ascii?Q?Bf1epiqI4DQC1gVcU+i/ZvuCFAlPCW8uwPHKjSdDzPO2ucXg1jcZmSO9t84r?= =?us-ascii?Q?xMrKpxK69FftXr3K1WKYYrp71Yetz2LSCoF60x1zwYWI2EjzUpxxfukwb6dC?= =?us-ascii?Q?qVCblzpyhhNbWrGFTmY4aUJDeg5QC6WvPe6pLRHuPCDT1Q1BYmFpNnIg4a2T?= =?us-ascii?Q?GUCYoB0aFrfOkr3+JsxH9fGqYqNLWWh0M806QHQsW2UttDapLww2szprXDl7?= =?us-ascii?Q?MSRnfU63wznWT7upwUUBa8f9AOkS4akP1M+g5e08IxhalAsOMG1JveYtK8IY?= =?us-ascii?Q?X6zAw1kKnmZ3aH8K1JezOFuQLHjpmtbI2RSmWP9Y4l2PFqXYbTi12SZVfAEs?= =?us-ascii?Q?5mRduEappz9RdZ3xTEEl9rvSHqFzUXWt2/QzDLQz/Oae/uKDyVX+52Lp4zjU?= =?us-ascii?Q?55M2weRvmlU4bfKNO8qBS2BJbq+G2I3rTHnPBqfCZVzdwrwsmDk4P94Pnlux?= =?us-ascii?Q?3SamhplU0766cJLc8O9Db7lz7uJK3KuJwC7bWvRtc9KUV9ZeIzgKpgO+jFGH?= =?us-ascii?Q?MFIBwd+N0VA3fMYfRND6Q9BG7YdyluzA6vXymJfIdJwJ2w2aRj7jT3H4EIat?= =?us-ascii?Q?sJLriyxFL2gmZ/xC6pdcUKGsrl2mvlXzF4O84kYCa+EAIHc2K/PtihBwPTbK?= =?us-ascii?Q?O8JjTMIhyKQ1XKPjAW0y80pcU96F5W5P2SuuvvZwf7YszDtDTbEFKVuIkEmy?= =?us-ascii?Q?/n7oaH1bug=3D=3D?= X-Exchange-RoutingPolicyChecked: QnmkkM0fhFGZGN72/aDvGvz68FEAkb2wUhiWZdubGBJLQijb02Pbbo5aitnJMrX0sGPT5pU2Q96yvfu1jcEEaSLaU9YaVot6UiTDR0mUvHTf0/Vl593n525udEfF1VpwDyaioGAz+/Is4SzJru+0QwxS+oi9mhWTv6kod9+66rGSf99bdIx7Mqxs7/UC1sjUEhqLXDf93uO9BysZB9zC/hnapGtt2u+UtS0OR10xzmNXaQYQhG7K4SUFO8q0GmuAJOUX6F+B+ENYIllR1GqULiTLv4Qw6+HuuniROQizwpniIBGn1Y1NrId87vdcHZ+S7ep+KOYoOTMu2HeTMKB3uw== X-MS-Exchange-CrossTenant-Network-Message-Id: fecc78e4-508b-4438-1c3a-08df51b67872 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6020.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2026 03:27:06.1428 (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: vx6XY/rvjjwbs4kkbaehOMRP86dAVYs2AsJyeK50imtHPfOc+1OUm3Pq7OImghtl8g58RgHM690qfMvypkcb5w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB7578 X-OriginatorOrg: intel.com Hi Reinette, On Thu, Dec 03, 2026 at 01:43:45PM -0800, Reinette Chatre wrote: > Hi Chenyu, > > On 12/3/26 7:50 AM, Chen Yu wrote: > > On Wed, Dec 02, 2026 at 11:12:26AM -0800, Reinette Chatre wrote: > >> On 11/26/26 6:44 AM, Chen Yu wrote: > >>> On Wed, Nov 25, 2026 at 11:04:38AM -0800, Reinette Chatre wrote: > >>>> On 11/5/26 2:08 AM, Chen Yu wrote: > >>>> ... > >>>> > >>>>> diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c > >>>>> index b5a86e5aa4e3..2b9a13be5975 100644 > >>>>> --- a/arch/x86/kernel/cpu/resctrl/core.c > >>>>> +++ b/arch/x86/kernel/cpu/resctrl/core.c > >>>>> @@ -1018,11 +1018,18 @@ static __init void check_quirks(void) > >>>>> > >>>>> static __init bool get_rdt_resources(void) > >>>>> { > >>>>> + bool ret; > >>>>> + > >>>>> snc_nodes_per_l3_cache = snc_get_config(); > >>>>> + erdt_init(); > >>>>> rdt_alloc_capable = get_rdt_alloc_resources(); > >>>>> rdt_mon_capable = get_rdt_mon_resources(); > >>>>> > >>>>> - return (rdt_mon_capable || rdt_alloc_capable); > >>>>> + ret = (rdt_mon_capable || rdt_alloc_capable); > >>>>> + if (!ret) > >>>>> + erdt_exit(); > >>>>> + > >>>>> + return ret; > >>>>> } > >>>> > >>>> Looking at the solution as a whole I do not think that this enumeration is > >>>> ideal. erdt_init() sets erdt_enabled irrespective of > >>>> erdt_cpu_has(X86_FEATURE_CQM_OCCUP_LLC) being true. Specifically, a user > >>>> may boot with "rdt=!cmt", which is the only ERDT enabled feature, and that > >>>> will result in erdt_enabled being true but that does not actually mean "ERDT > >>>> is in use". > >>>> > >>>> I think there is a real problem because of this when looking at the CPU > >>>> online code that gates the domain binding and configuration on erdt_enabled. > >>>> If I understand correctly a CACD inconsistency drops the CPU out of _every_ > >>>> L3 CAT, L2 CAT, MBA and MBM domain, even though no ERDT data is ever read. > >>>> > >>>> This looks to be a recurring problem and so far the solution has been to > >>>> add additional gates based on erdt_cpu_has(X86_FEATURE_CQM_OCCUP_LLC) at various places, > >>>> but I wonder if this can be simplified by changing the contract. > >>>> > >>>> Instead of erdt_enabled meaning: > >>>> /* True when the ERDT ACPI table describes at least one domain with at least one CPU. */ > >>>> could it mean (something like) > >>>> /* ERDT is in use */ ? > >>>> > >>> > >>> OK, does "ERDT is in use " stand for: > >>> > >>> At least one ERDT feature in "MMIO-based CMT, region-aware MBM, region-aware MBA" > >>> is enabled on this system? > >> > >> That is more accurate, yes. I do not know how you intend to use this list, if it > >> is just to replace the existing comment it may be something that could easily become > >> out of date as new features are added. > >> > > > > OK, to keep it non-feature-dependent, let me rephrase it to > > " True when ERDT is in use, i.e. at least one feature is backed by ERDT. " > > I think that states the same thing twice. Could it be simplified to: > /* True when at least one feature is backed by ERDT. */ > > >> > >> One option to deal with this may be something like: > >> > >> /* > >> * ERDT can only be used for a feature that the CPU enumerates and the user has > >> * not disabled. Keep in sync with erdt_in_use(). > >> */ > >> static __init bool erdt_may_be_used(void) > >> { > >> return rdt_cpu_has(X86_FEATURE_CQM_OCCUP_LLC); > >> } > >> > >> /* ERDT is in use when at least one feature is backed by ERDT. */ > > Note how the two comments would tie erdt_enabled and erdt_in_use() together. > > >> static __init bool erdt_in_use(void) > >> { > >> return erdt_cpu_has(X86_FEATURE_CQM_OCCUP_LLC); > >> } > >> > > ... > > >> One issue that remains seems unlikely? When more ERDT features are supported > >> then an issue during parsing of a user-disabled feature would impact all ERDT > >> features. One option here is to move the rdt_cpu_has() check into parse_rmdd_table() > >> so that the feature specific table is only parsed when the CPU enumerates the feature. > >> > > > > If I understand correctly, what you mean is a case like below. > > Say ERDT later also backs MBM (via MMRC table): > > 1. The user boots with rdt=!mbmtotal,!mbmlocal. > > 2. CMT is still wanted, so erdt_may_be_used() is true and the whole > > ERDT table is parsed. > > 3. The MMRC is broken, so mmrc_init() fails. > > 4. parse_rmdd_table() fails and ERDT is torn down completely, so victim > > CMT loses its MMIO support. > > Right. > > > > > I'm thinking of adding this erdt_may_be_used() check in erdt_init() in > > the current commit, but in a later commit, when CMRC parsing is introduced > > in ("x86/resctrl: Parse ACPI CMRC table"), remove this erdt_may_be_used() > > in erdt_init(), and delegate to parse_rmdd_table() to skip the CMRC if the > > user asks to do so: > > Can this be avoided? Ideally the patches in the series should build on each > other and later patches are not expected to undo changes made earlier in series. > OK. I plan not to add erdt_may_be_used() to the current commit: ERDT parsing will be unconditional, and the CMRC patch will directly use rdt_cpu_has() to filter CMT, so no synchronization between erdt_may_be_used() and erdt_in_use() is needed. The tradeoff is that this intermediate commit can parse ERDT even when CMT is disabled and may produce misleading ERDT log information, so users should use ERDT only after applying the final patch set, where the CMRC rdt_cpu_has() gate prevents such processing. thanks, Chenyu