From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from CH5PR02CU005.outbound.protection.outlook.com (mail-northcentralusazon11012056.outbound.protection.outlook.com [40.107.200.56]) (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 D03282C0F79; Mon, 16 Feb 2026 19:24:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.200.56 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771269855; cv=fail; b=jazzT78kHs9WISK0IzrEvQU6Bspiyun6B9eQtmtRRjHtWeRGmOt6KVegB0xF/6bS3dENzbKLFp2MolIAPzzPPcslkJ3mdJ1T5f1axLQkGiqLdCi5XWBpogYMRkTZy1ROdCB2WJ+anKDWRNhC+xlxcYJqrrkpeREQtfCJnRC4EOE= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771269855; c=relaxed/simple; bh=lXjk6AbbuZ+GSxBhFHfEZaWR43orssvecQr+6ZZmA10=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=FzRYprbZNUMF9QSdKekrZea6FmyyNUa6QiMxHqIbYJqGzDEqmKTJO9T5woK1e+O3/hOBMeZmriFf0Ziq61M5qRTuWdsiVgrF3jn+adOrOyJo7OqEYJIi8StFkTyPpJCsUHNPtVpcPUh2PRiie8Mcjr4tzcLgnf6DlGSkXup8Ky8= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=tJ42hjgk; arc=fail smtp.client-ip=40.107.200.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="tJ42hjgk" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yNOf3BoKNUkLBQgubU7esyhbVwobnBXCm1ERM1xht66AfpZRcXWyH02sbD0vdfXApqRxbiWYqsSfiBG8S66s86C4XQC4y2gn+8nXZjv3zaPsPzgOlIDvf+notWqJeInLyuj+aVjbYOfFsodLoaVXBVwn0JsxYFhY2Wpmy3YpfyLOi88V3EICJoxDro6lqlPqMrdS3jYSThUExMZZIkzuR69+YIzhzVFeXbW9JR2xfU8QrN5qXWvbVC6pKLJrj0PLuo8SNqmz35DsmzS551m7WaToBzyuwgIp3haprYBgW0XFny1K1s9xkBHu/GbUxnE21M5h2qDoEXdJCSEhA3bNmQ== 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=nx2DvzsMuqT4KinbXxO8TM0i2RIuYgO8jdMIdksoEc4=; b=rhoTK/xdL2MDf7JSJ0JTdL5ePqaTEMvACZouhah9zDGeR0z+2swOhvUKoIHsOkXr0Eqv+wW7yGQ14qhqgu8Tmi29EH8d4K1Rgzs+PKW2iib+t7j4KJuCCx+n7uuI+/FhfQRxD4oBm4ZUbcEQysZzuBb1Vy+puZpujSsvHpm1IcCI47cqWzx0JwcK2m9/7xGzc2y7gFBOOnX/i/3+DpfavAOgFush9RTvp8HPgUdkwOzId1FaFxqYy7qPOQuCgYc+uytTFi49rEuuU9XMoYtLdmRiEnpxJfRRhLnbNtw33bOvslueBb+jGSooHz5ohuXzezY9g23ypxhmSNivlHy0mQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nx2DvzsMuqT4KinbXxO8TM0i2RIuYgO8jdMIdksoEc4=; b=tJ42hjgkbu1AcapTLgGQ62yUbz8RG9dsx5qwDySX/j1Kucn6gb+FCpdNosuR1T5D/clvxvZhXgJsTSLnslt84uaKP41HTWJK+bRhXb/2760xj+H2TLnUnCCbiO4Zy6+otdehDZkl2mkZJUpBG1wsw9Ydi1vaqiOE9zbeHdzmfYY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from IA0PPF9A76BB3A6.namprd12.prod.outlook.com (2603:10b6:20f:fc04::bdc) by SN7PR12MB6838.namprd12.prod.outlook.com (2603:10b6:806:266::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9611.16; Mon, 16 Feb 2026 19:24:10 +0000 Received: from IA0PPF9A76BB3A6.namprd12.prod.outlook.com ([fe80::4d0e:603a:42fc:7c0]) by IA0PPF9A76BB3A6.namprd12.prod.outlook.com ([fe80::4d0e:603a:42fc:7c0%3]) with mapi id 15.20.9611.008; Mon, 16 Feb 2026 19:24:10 +0000 Message-ID: <4904a6e7-9f6f-43ae-b591-1b9672ddac6e@amd.com> Date: Mon, 16 Feb 2026 13:24:05 -0600 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 13/19] x86/resctrl: Add PLZA state tracking and context switch handling To: "Luck, Tony" , "Moger, Babu" Cc: Reinette Chatre , "corbet@lwn.net" , "Dave.Martin@arm.com" , "james.morse@arm.com" , "tglx@kernel.org" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "hpa@zytor.com" , "peterz@infradead.org" , "juri.lelli@redhat.com" , "vincent.guittot@linaro.org" , "dietmar.eggemann@arm.com" , "rostedt@goodmis.org" , "bsegall@google.com" , "mgorman@suse.de" , "vschneid@redhat.com" , "akpm@linux-foundation.org" , "pawan.kumar.gupta@linux.intel.com" , "pmladek@suse.com" , "feng.tang@linux.alibaba.com" , "kees@kernel.org" , "arnd@arndb.de" , "fvdl@google.com" , "lirongqing@baidu.com" , "bhelgaas@google.com" , "seanjc@google.com" , "xin@zytor.com" , "Shukla, Manali" , "dapeng1.mi@linux.intel.com" , "chang.seok.bae@intel.com" , "Limonciello, Mario" , "naveen@kernel.org" , "elena.reshetova@intel.com" , "Lendacky, Thomas" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "peternewman@google.com" , "eranian@google.com" , "Shenoy, Gautham Ranjal" References: <17c9c0c252dcfe707dffe5986e7c98cd121f7cef.1769029977.git.babu.moger@amd.com> <5ec19557-6a62-4158-af82-c70bac75226f@amd.com> <7a4ea07d-88e6-4f0f-a3ce-4fd97388cec4@intel.com> Content-Language: en-US From: Babu Moger In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SA1P222CA0094.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:35e::14) To IA0PPF9A76BB3A6.namprd12.prod.outlook.com (2603:10b6:20f:fc04::bdc) Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA0PPF9A76BB3A6:EE_|SN7PR12MB6838:EE_ X-MS-Office365-Filtering-Correlation-Id: ea1dabfc-57a4-49c3-45dc-08de6d90f5aa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016|7416014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?bHZLWGZHVEl2U0tRbEN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1NUtNVW5nRSs0?= =?utf-8?B?TU0va2NlZjdWamtRaVRqdlZIcndxaFlONXlWOGlWY3NFSktiUi9vS0ZjMW1V?= =?utf-8?B?K2lBYkxKelpyL25oeHZUQm1YanBOcUdJWG0vVjNqdzFtNHY1U2tvM2ltc1BQ?= =?utf-8?B?WDdXenpxU01WZ1QxbnhxU0J2RjBubGJyUGY4dVVnWEtibnpyOFhKT1hJeGdn?= =?utf-8?B?U3RuZDIwV1RBVm1udzdWRXNaR093WDBPdVVEUFdTeFZYY0l6UUdJOGZtWTMx?= =?utf-8?B?dy9uOUxGUnEydmV5M2lTc1VsdHZxaGZyTjc0MzdwY1orTkVnanRWYVhDR1hQ?= =?utf-8?Q?ewJA=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA0PPF9A76BB3A6.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016)(7416014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bVNPTW9KRGx2N2FZcjlHdVdUSnVnTWJFOGE3Qys4WDlrQ0NtOE5uZFJoWFN2?= =?utf-8?B?WTVBeWdJWWtCV3RsWHRhYUhWc25UVThDZzN2ZmtySWJlV0thbWo5elZlem5p?= =?utf-8?B?U29reUpMVG5ROWFSZXZXWHo4bVE3TUY3R2JRNFI3ZTl1eUQ3alhZMTIyTFRU?= =?utf-8?B?VHByNlROV3VSR3VsTU9xTzlQbS9xYTZEWDIrZjBQZmVRYktqK0lONmM1ZlpV?= =?utf-8?B?NUQ0RHBjLzQ5QUhSM0R4UDBnVDdONDU3RHUxcTlQVGxsU25hRnhLa0lVZHdH?= =?utf-8?B?bmpkUFRubTRnWjk1dlNjSkt4ODVDcnJudnlrNHFtV0o4UnAwNTdMb3FwMW03?= =?utf-8?B?QkMzbUNUNW04NXk3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QRkRpMzArQ0Jn?= =?utf-8?B?NzRLSnFrNlM4OVQ3Q0wwdENVM3JpRjg2aHd1eTFlemFJZkJOVlNHbVQ0dlRV?= =?utf-8?B?bm1MWGFWT0V6T09XdjRjeHcyelkwcTFTejJ6Z0xuSGhsRDA0cHYzcnJQTU1V?= =?utf-8?Q?S/Cr2CbhouxBuR7iL9?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea1dabfc-57a4-49c3-45dc-08de6d90f5aa X-MS-Exchange-CrossTenant-AuthSource: IA0PPF9A76BB3A6.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2026 19:24:09.9371 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GJFkKjYtJdZ63GjZvoy+zOJ5TQ9ppFmLHME21nT/t1zJbctDOVvqJNHxMFFATSYP X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6838 Hi Tony, On 2/13/26 11:02, Luck, Tony wrote: > On Fri, Feb 13, 2026 at 10:37:48AM -0600, Moger, Babu wrote: >> Hi Reinette, >> >> On 2/10/2026 10:17 AM, Reinette Chatre wrote: >>> Hi Babu, >>> >>> On 1/28/26 9:44 AM, Moger, Babu wrote: >>>> >>>> On 1/28/2026 11:41 AM, Moger, Babu wrote: >>>>>> On Wed, Jan 28, 2026 at 10:01:39AM -0600, Moger, Babu wrote: >>>>>>> On 1/27/2026 4:30 PM, Luck, Tony wrote: >>>>>> Babu, >>>>>> >>>>>> I've read a bit more of the code now and I think I understand more. >>>>>> >>>>>> Some useful additions to your explanation. >>>>>> >>>>>> 1) Only one CTRL group can be marked as PLZA >>>>> Yes. Correct. >>> Why limit it to one CTRL_MON group and why not support it for MON groups? >> There can be only one PLZA configuration in a system. The values in the >> MSR_IA32_PQR_PLZA_ASSOC register (RMID, RMID_EN, CLOSID, CLOSID_EN) must be >> identical across all logical processors. The only field that may differ is >> PLZA_EN. >> >> I was initially unsure which RMID should be used when PLZA is enabled on MON >> groups. >> >> After re-evaluating, enabling PLZA on MON groups is still feasible: >> >> 1. Only one group in the system can have PLZA enabled. >> 2. If PLZA is enabled on CTRL_MON group then we cannot enable PLZA on MON >> group. >> 3. If PLZA is enabled on the CTRL_MON group, then the CLOSID and RMID of the >> CTRL_MON group can be written. >> 4. If PLZA is enabled on a MON group, then the CLOSID of the CTRL_MON group >> can be used, while the RMID of the MON group can be written. >> >> I am thinking this approach should work. > I can see why a user might want to accumulate all kerrnel resource usage > in one RMID, separately from application resource usage. But wanting to > subdivide that between different tasks seems a stretch. > > Remember that there are 3 main reasons why the kernel may be entered > while an application is running: > > 1) Application makes a system call > 2) A trap or fault (most common = pagefault?) > 3) An interrupt > > The application has some limited control over 1 & 2. None at > all over 3. > > So I'd like to hear some real use cases before resctrl commits > to adding this complexity. > Imagine you have a strongly throttled thread going into the kernel and grabbing a global lock in kernel. At the same time, an unthrottled high priority  thread enters the kernel on any other CPU and tries to acquire the same lock. Because the lock holder is slowed down, it runs slow inside the critical section protected by  the lock. The high priority thread is now slowed down causing the priority inversion. We have seen this happening in certain workloads. The only way to avoid this problem is to ensure that any thread entering the kernel operates with the same throttling level. Only viable option is unlimited bandwidth in kernel for all the threads. This means the kernel needs to either run on a different CLOSID or the setting of the CLOSID needs to change on kernel entry and exit at each entry point (syscall, trap, fault, ...). We have tried manually changing the CLOSID during kernel entry and exit and found it very expensive. The only sensible way of doing this is via hardware support and that is what PLZA enables. Thanks Babu >>> Limiting it to a single CTRL group seems restrictive in a few ways: >>> 1) It requires that the "PLZA" group has a dedicated CLOSID. This reduces the >>> number of use cases that can be supported. Consider, for example, an existing >>> "high priority" resource group and a "low priority" resource group. The user may >>> just want to let the tasks in the "low priority" resource group run as "high priority" >>> when in CPL0. This of course may depend on what resources are allocated, for example >>> cache may need more care, but if, for example, user is only interested in memory >>> bandwidth allocation this seems a reasonable use case? >>> 2) Similar to what Tony [1] mentioned this does not enable what the hardware is >>> capable of in terms of number of different control groups/CLOSID that can be >>> assigned to MSR_IA32_PQR_PLZA_ASSOC. Why limit PLZA to one CLOSID? >>> 3) The feature seems to support RMID in MSR_IA32_PQR_PLZA_ASSOC similar to >>> MSR_IA32_PQR_ASSOC. With this, it should be possible for user space to, for >>> example, create a resource group that contains tasks of interest and create >>> a monitor group within it that monitors all tasks' bandwidth usage when in CPL0. >>> This will give user space better insight into system behavior and from what I can >>> tell is supported by the feature but not enabled? >> >> Yes, as long as PLZA is enabled on only one group in the entire system >> >>>>>> 2) It can't be the root/default group >>>>> This is something I added to keep the default group in a un-disturbed, >>> Why was this needed? >>> >> With the new approach mentioned about we can enable in default group also. >> >>>>>> 3) It can't have sub monitor groups >>> Why not? >> Ditto. With the new approach mentioned about we can enable in default group >> also. >> >>>>>> 4) It can't be pseudo-locked >>>>> Yes. >>>>> >>>>>> Would a potential use case involve putting *all* tasks into the PLZA group? That >>>>>> would avoid any additional context switch overhead as the PLZA MSR would never >>>>>> need to change. >>>>> Yes. That can be one use case. >>>>> >>>>>> If that is the case, maybe for the PLZA group we should allow user to >>>>>> do: >>>>>> >>>>>> # echo '*' > tasks >>> Dedicating a resource group to "PLZA" seems restrictive while also adding many >>> complications since this designation makes resource group behave differently and >>> thus the files need to get extra "treatments" to handle this "PLZA" designation. >>> >>> I am wondering if it will not be simpler to introduce just one new file, for example >>> "tasks_cpl0" in both CTRL_MON and MON groups. When user space writes a task ID to the >>> file it "enables" PLZA for this task and that group's CLOSID and RMID is the associated >>> task's "PLZA" CLOSID and RMID. This gives user space the flexibility to use the same >>> resource group to manage user space and kernel space allocations while also supporting >>> various monitoring use cases. This still supports the "dedicate a resource group to PLZA" >>> use case where user space can create a new resource group with certain allocations but the >>> "tasks" file will be empty and "tasks_cpl0" contains the tasks needing to run with >>> the resource group's allocations when in CPL0. >> Yes. We should be able do that. We need both tasks_cpl0 and cpus_cpl0. >> >> We need make sure only one group can configured in the system and not allow >> in other groups when it is already enabled. >> >> Thanks >> Babu >> >>> Reinette >>> >>> [1] https://lore.kernel.org/lkml/aXpgragcLS2L8ROe@agluck-desk3/ >>> > -Tony >