Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp73775rbb; Fri, 23 Feb 2024 12:11:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXI0BhqjGs+iUl3clcDcLrP/8CWeAnBOcJnKwf/Re/fxJyKWmCmx1i0uGpK/TdDOrkHdebKcYrqDagVas3OCa8oBZjkKRZ0dOfxc1z5Ew== X-Google-Smtp-Source: AGHT+IHNFeCiI/Czihjy/saR4eDSeuW7c5RFXQmwm6qnSIRYkRalhxtq7UefFaCyjz83BbI3Wu4C X-Received: by 2002:a05:6102:2927:b0:471:adef:cc2a with SMTP id cz39-20020a056102292700b00471adefcc2amr1176563vsb.9.1708719097455; Fri, 23 Feb 2024 12:11:37 -0800 (PST) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ib2-20020a0561022b8200b004706029ce09si2149211vsb.284.2024.02.23.12.11.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 12:11:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79079-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="Ti/DZzyy"; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-79079-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79079-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id F26B81C2240C for ; Fri, 23 Feb 2024 20:11:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62092146E70; Fri, 23 Feb 2024 20:11:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="Ti/DZzyy" Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2057.outbound.protection.outlook.com [40.107.92.57]) (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 6DDA5145B33; Fri, 23 Feb 2024 20:11:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.57 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708719088; cv=fail; b=IzRsLNI9LwGj9eFoGHWfnMjGNlW77Ug2yY6uAo0+NTx6hcDkVWQcnWPMwvvtEsp+r5fwR0dxN3iCSj1YnWPQwbrHHaU+52u59HYgYpDya9uu9UqMy6MoZw2O2srVqcXOVTdQsS+Gq0o9u3URdwKAv27RJ7ryVdkOhWwJxMdU5uc= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708719088; c=relaxed/simple; bh=Lkt86Sb7ksqk7Q/b3fe6BzPi3orsGBQ3fqYW3YeuJls=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=U0x30K+w2EoR5TJMbBtRoNYmWTfYaEWEjn2aJ9j2XyWb+IF2g79KtpbHEDKTsJ0Ai++xXO5LGxdy68rklJ+JRe8ckZxPQen48ecbmbmJj9Z9MgmrYQNiLx75NpQ9fB7tYFnju2rtaoru/tZpfJ2c4LmIef4texCQwyTQQERhp6o= 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=Ti/DZzyy; arc=fail smtp.client-ip=40.107.92.57 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ig66DA9QzWAnZKQg2F+2lZjlpqqMX9fo7L7XxbS0CJUTcsVagEDULjxqqlp5A6OYCSlAzXnfTL5cc+N48NvSCYR4mrCP51pSnyh7q2pqcsCFonjfIXvfDlO+3mUS5kurXS0X3h5w/7v7RY0+F+HMUgWu3ISZud4YDb15jdKvMaYO2znoCMiAbzt4Bo+QZJpqNrbUofc2k0mJr34oXuo4q7ii+dRXY947quyKwh43izsdSs1VCNtIX45e/3mrqD91BHyrLtqU/JIhWctQrn2GKNW1FqCAFNpM+PpCCZPFWQXCab86TFQ6y0Uo5zMjrsncAEGj93Y3UN+3l1nil+MHbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=b+juKTOJcZMhkPqVxmDILCZvi5XUU2Dl+V34rvefBOI=; b=jkELoxz4PJylsdkg7448P0ia2l/UPHq05OZk8oP2IUfa3zYfW6ctzmujczA1aUSHLc+Eu+DDMD+guOLorRrdc5ygJIIDJB0LulTKcYnpTOH5tXjhRZq/SqCge55fmw835uHWQE/gcmWrXKdy205Ukz3IL3B8K8my1sKXcc2MSDZ+58yHh+KHRDFi8OdHTOoI3CaULZnppdN5GuKVZS2F9cSwP37xadQyGfh/sUW30PmoLCrKyfl9+xyRHdMDwuvc1AIe4gchXeWo53cEKy72XOkPMkASusyurxQ6Y+4vrUFqyfXl1oAius5CHD8FcgEcJoav9awUbB4vCGyyzoawuQ== 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=b+juKTOJcZMhkPqVxmDILCZvi5XUU2Dl+V34rvefBOI=; b=Ti/DZzyyQ81IB+G7LtHGG5WoTSJNQrd5+8oSb8Py5ByoziuYsOXn1uPIAfftR65iLEwjKXFqdc5OBb32bU6b3uQrV1W9VMEniuQtjkwQv7S9Zb72zPwvGrDAU9NygilN+FYr09OYezeO0ABpM/oDZrTlY3naTJeCmq9rp70zSfI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MW3PR12MB4553.namprd12.prod.outlook.com (2603:10b6:303:2c::19) by SJ1PR12MB6193.namprd12.prod.outlook.com (2603:10b6:a03:459::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.24; Fri, 23 Feb 2024 20:11:20 +0000 Received: from MW3PR12MB4553.namprd12.prod.outlook.com ([fe80::f4aa:152b:b46f:80a0]) by MW3PR12MB4553.namprd12.prod.outlook.com ([fe80::f4aa:152b:b46f:80a0%4]) with mapi id 15.20.7316.023; Fri, 23 Feb 2024 20:11:20 +0000 Message-ID: <3fe3f235-d8a6-453b-b69d-6b7f81c07ae1@amd.com> Date: Fri, 23 Feb 2024 14:11:15 -0600 User-Agent: Mozilla Thunderbird Reply-To: babu.moger@amd.com Subject: Re: [PATCH v2 00/17] x86/resctrl : Support AMD Assignable Bandwidth Monitoring Counters (ABMC) Content-Language: en-US To: Reinette Chatre , James Morse , corbet@lwn.net, fenghua.yu@intel.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com Cc: x86@kernel.org, hpa@zytor.com, paulmck@kernel.org, rdunlap@infradead.org, tj@kernel.org, peterz@infradead.org, yanjiewtw@gmail.com, kim.phillips@amd.com, lukas.bulwahn@gmail.com, seanjc@google.com, jmattson@google.com, leitao@debian.org, jpoimboe@kernel.org, rick.p.edgecombe@intel.com, kirill.shutemov@linux.intel.com, jithu.joseph@intel.com, kai.huang@intel.com, kan.liang@linux.intel.com, daniel.sneddon@linux.intel.com, pbonzini@redhat.com, sandipan.das@amd.com, ilpo.jarvinen@linux.intel.com, peternewman@google.com, maciej.wieczor-retman@intel.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, eranian@google.com References: <20231201005720.235639-1-babu.moger@amd.com> <2f373abf-f0c0-4f5d-9e22-1039a40a57f0@arm.com> <474ebe02-2d24-4ce3-b26a-46c520efd453@amd.com> From: "Moger, Babu" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SA9PR10CA0025.namprd10.prod.outlook.com (2603:10b6:806:a7::30) To MW3PR12MB4553.namprd12.prod.outlook.com (2603:10b6:303:2c::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: MW3PR12MB4553:EE_|SJ1PR12MB6193:EE_ X-MS-Office365-Filtering-Correlation-Id: b838cb8b-443d-4ba0-72b9-08dc34ab998a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 738J4fuGOtlLfplhw6eAmSaHSmXUs5RUhBM4V9hf92Bwpz+N1HUuE3n1wRaq5HR5+OktG7EpK3Q4/gSEQDmIakwAloxKHOYHOJLn+FeDA96zmMIcpQ9sS39K9V06lILTBD4VREPYcsUz32rhiwI1X16JydNgEAQN6pHrvcVegFCDNnb2WVnreE8HqQnA9xWs+DpqZA0Oj5Y6Wecrmtajb0b8uBXl6uDGLzHNn+r/Mn7rxeL000JRm7OTJt+1HLkVn52Z3lfChGHklKWksDuu8VwGW8DL4Hgvc3yMFoZ/ZANNwFx7sMciG2LQuVB9MIk2LSvoMzVOWYjGjmLaasbTPpMQNTn2+jNBd1RqM5YtuwckCh73XcfZVS7I1PjcgWh7z6Os5hYao2zCLI11FKmkhhMMfEAT1KCvpYTWfmGpbNwVulE7NKLFRsoT4/P49DJWzbaAaO1azsVNo+9oCvnz9DuDuPtfGxctQthtwwog1w692vEVOXKm3yhI6T85QHGOsO7qS96vL0i0EDlKtkIsfijUy/WiSTSzKe2gNUFq9hU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW3PR12MB4553.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cXI1RDlPZHFzWnhrazlpNlZidWhaYjU0L3BVY0VkVzJMMHR0VFg1OG5hYVBO?= =?utf-8?B?a0NFdHh0OUgwOFFZMllGYlRvTDBmZS9OTG1TcDR0VmZsdXNtb1k4SkVDYjhl?= =?utf-8?B?TDZtc2ZmMUYzZDVXeWZuYzllZEdod1FWQmpoY0lGL2kvSHhYd2hZRlJiejlU?= =?utf-8?B?WEc0SVNWemMreGtHUlJoYU9rWDJRV2xUa2RvOFkxTkQxWGhzcTV0MFAzSStN?= =?utf-8?B?b3dHcDFwV0tEY1Bnd1lDS2ZzMUtheDBxNGM4eENqNGc2L0lxNWVMOXNGZW1D?= =?utf-8?B?TDdRdWlremdCVllxdEVqY2ZUMjd2RGJ3WUYwbmFzMEU0OGF5ZXZiNnhRZ2xQ?= =?utf-8?B?L1E5RkZSTGZMQXMweVY5NXpWWDNZN0hvQis3eEduTll1UU1KUjVMN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-CrossTenant-AuthSource: MW3PR12MB4553.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2024 20:11:20.1320 (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: Fxb3z/VoZlVfCeXi8JPPi4MkcSdjwJKBtMQKSqFkqgyIT4HVxT9R/2MOFiMXOxHV X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6193 Hi Reinette, On 2/23/24 11:17, Reinette Chatre wrote: > > > On 2/20/2024 12:48 PM, Moger, Babu wrote: >> On 2/20/24 09:21, James Morse wrote: >>> On 19/01/2024 18:22, Babu Moger wrote: > >>>> e. Enable ABMC mode. >>>> >>>> #echo 1 > /sys/fs/resctrl/info/L3_MON/mbm_assign_enable >>>> #cat /sys/fs/resctrl/info/L3_MON/mbm_assign_enable >>>> 1 >>> >>> Why does this mode need enabling? Can't it be enabled automatically on hardware that >>> supports it, or enabled implicitly when the first assignment attempt arrives? >>> >>> I guess this is really needed for a reset - could we implement that instead? This way >>> there isn't an extra step user-space has to do to make the assignments work. >> >> Mostly the new features are added as an opt-in method. So, kept it that >> way. If we enable this feature automatically, then we have provide an >> option to disable it. >> > > At the same time it sounds to me like ABMC can improve current users' > experience without requiring them to do anything. This sounds appealing. > For example, if I understand correctly, it may be possible to start resctrl > with ABMC enabled by default and the number of monitoring groups (currently > exposed to user space via "num_rmids") limited to the number of counters > supported by ABMC. Existing users would then by default obtain better behavior > of counters not resetting. Yes, I like the idea. But i will break compatibility with pqos tool(intel_cmt_cat utility). pqos tool monitoring will not work without supporting ABMC enablement in the tool. ABMC feature requires an extra step to assign the counters for monitor to work. > > The "new feature" could then be viewed as adding support for more monitoring > groups than what hardware can support concurrently. > > Reinette -- Thanks Babu Moger