Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1388882lqm; Thu, 2 May 2024 13:15:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU2LtLkSEpzE9xRDc2hzokspkzbeRWL8DVOojfRBFmG7y0rBSr+Wfpi3J6yH3JZhUObegIy9iBzjOSU34NTqs2v5PAik+/RsUb8HkV5ZA== X-Google-Smtp-Source: AGHT+IEL66keg1YnQ2gAwXoSqJHH76VzxWwFJDrlS/N+jDfXCdRAdKAzjUB3xZxPKapvXN8f1bpB X-Received: by 2002:a05:6a21:800f:b0:1ad:22bd:d6d8 with SMTP id ou15-20020a056a21800f00b001ad22bdd6d8mr760375pzb.4.1714680910797; Thu, 02 May 2024 13:15:10 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u9-20020a634709000000b005dccf9561c0si1564952pga.150.2024.05.02.13.15.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 13:15:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166897-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=3whWTIrk; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-166897-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166897-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 38E8C28291C for ; Thu, 2 May 2024 20:14:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A05F1181302; Thu, 2 May 2024 20:14:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="3whWTIrk" Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2065.outbound.protection.outlook.com [40.107.212.65]) (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 2737D15D5B7; Thu, 2 May 2024 20:14:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.212.65 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714680885; cv=fail; b=WdCWx/uEaRynAz9aWQSEvWqZJrLIKIIqawZmRW2DnmpG7zQJnvPBdmcFqgjgJjqAB0flFQfc1PVkh6d29lSJkA1dDIASV5KnD19yFwmSrgbdl0ZhpjTJsdZvWA07qbwv1mp1+AvoOysRmIHq0VB9tB1joFVd14MUs7tPdw8CTzk= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714680885; c=relaxed/simple; bh=zsdEQGAPhbmpoQ9THB7ElxMJeN0R+PnUZ1hjvbiK/x0=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=bZnx8dZoZz8V33f9isPweLRlJ1FsDKCdXWbocYhFP04QLw1qcZIERkiLmMHX42615MetqJXty8SoGrhYqux5DGrGnE76InPUBDnD7zwaVDNNI2tSR8H4Zmfbki6FtyWz3fVBBoXhmDodRZw/QwvrO/xhYuUo+vnlNn/Twk3p+yU= 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=3whWTIrk; arc=fail smtp.client-ip=40.107.212.65 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=V2+FRPPzt9BbTslESdM40+bdFwaBxyjbPQRItu2BE1xkv+29KWXUbj/MTXfBReKF6nAqJTFHQqGPjdBamITWnefBVJ4o8EGAXwFVfyS2pnlJp2JQ5sxc4egIpMSgeuBGrv8cdvxHCXJZOtsAIswMkjL0BFIgnjzJceJX+HRPe7Mg5Qkus8njfUsf0HT8bQ2kPQbedXQjODkQO/FOPhiYg9beFxHNUSymdmcrrlMNpK/PwsRqio0OXNa7j09TmNGD/2H/VlBJ8f5WD9Zy5oV6RB58ZMYEUk1SE7FuY7je7XojboGnUXcicrclIzDtRtnTaSl+ohUX7w3x0eBlrIN5Tg== 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=GvcDiPbxRDpaLPiQDLSJkgsZDrQBizpoe4KQpc/7pfk=; b=UzWTcfFqLg1dH5rHLAOkfA2u9itc3b5jyNzex4Fyc52cCduUhLURIepLTCJNBkqJ1RsLbsK7eaF8hgb7eQW59/45OFF61Q0NlrJ+IOreA+c+e8gboxscuvxUiFggrSS1KCmWNHtaNoFf46aC2hO4lb26LQ/fPpI7zMwe2GKgmptKAo2jmpYbyYCZkhr59l+V2NU6E6FNxr9SflnjjHrkUFvedwkz/ITtG/AfxAofbVlQF2X7FFtIMtq/PRhh8P3PdBC27AHF9uOkADvYa6PKfC+JPdgy+6wD77gq25tWY35BqJvXiRlfu7D50Rh1ZkO8QCn1wm/bXkQG6pbRmMKwWQ== 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=GvcDiPbxRDpaLPiQDLSJkgsZDrQBizpoe4KQpc/7pfk=; b=3whWTIrkWitTj00OxurQ1u7vzq3O74/A9RHAr4YOl4q93S50euwNmLsWXgpcEW+JXUfNPV8HaOqKv2BsFkJuxjxaNvZioQFuAvSjRN/+vgPkLyXalfnEw8TJGZb6ANQ2KrZm1s3Ex1II+xs5lAktF7XNk2FMjoRNmFIYpjon0xk= 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 CY5PR12MB6550.namprd12.prod.outlook.com (2603:10b6:930:42::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.26; Thu, 2 May 2024 20:14:38 +0000 Received: from MW3PR12MB4553.namprd12.prod.outlook.com ([fe80::b0ef:2936:fec1:3a87]) by MW3PR12MB4553.namprd12.prod.outlook.com ([fe80::b0ef:2936:fec1:3a87%4]) with mapi id 15.20.7544.029; Thu, 2 May 2024 20:14:38 +0000 Message-ID: <6edffe1b-e9a9-4995-8172-353efc189666@amd.com> Date: Thu, 2 May 2024 15:14:33 -0500 User-Agent: Mozilla Thunderbird Reply-To: babu.moger@amd.com Subject: Re: [RFC PATCH v3 00/17] x86/resctrl : Support AMD Assignable Bandwidth Monitoring Counters (ABMC) To: Peter Newman Cc: corbet@lwn.net, fenghua.yu@intel.com, reinette.chatre@intel.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, 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, maciej.wieczor-retman@intel.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, eranian@google.com, james.morse@arm.com References: Content-Language: en-US From: "Moger, Babu" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SA0PR11CA0032.namprd11.prod.outlook.com (2603:10b6:806:d0::7) 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_|CY5PR12MB6550:EE_ X-MS-Office365-Filtering-Correlation-Id: 275c24c0-b58f-4fa2-008d-08dc6ae47dec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|7416005|366007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?bGxUM2RPc2M3MnE4dUx1M1RmNUVqWFlPNllSQWNBUUMzaCtCZ0MrdTkwMFUy?= =?utf-8?B?RWYrY0ZsT2tlU1ZuYlFsbHFwK1JoT3l4cTVtQkpuSmxJb1ROUFRFbVdYdHFq?= =?utf-8?B?Y09VMFdrUk1VL2NQU3J5NXV6dEYzWkgybFFUS1VyaitZYVFMZnNwbVR5bU5W?= =?utf-8?B?YllZKy9zQ0dtcnhSYjIyV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RlBEaGlITTRBQko3dXAvNEtBcEFTb0QxRjQ1ZnRh?= =?utf-8?B?bVFwUktuc1U5NWFyRjFDR0FoRWVCVlZsR05pRm53cnpiN1c4MU9YOEpBV0hN?= =?utf-8?B?T1o4bVFCb0dDY1FuUHNIYXBiVmUrRUFqZDZFdWRpNE9mR3VPb1dtZnp6T2c2?= =?utf-8?B?dXEwOU93eFdGUW94RnhpakZwUXNHZ0xNUmJZQVMxU2RrRUpLMjQwbkhTendV?= =?utf-8?B?S3l5bUJoalFmbXhQNmVta0daN2kybS9TZ2RaN0tBeUJ3T0pnL2NnZVVIckl5?= =?utf-8?B?QVhFdEhLS0JLL2o2VDdzUVlQd2l2cGVoWDZpNTUxT0tsL0pDaUxRVFI0bmNo?= =?utf-8?B?Z1VwU0RRNGVkR3BQL2NLWDR2eG9TbHNWYTBGL1RpT2pXOHFqclNJUmYrNTZW?= =?utf-8?B?bHVzZ2l1bjd6anZDWW9URkxBRlVzamtoNTRZRXpDQi94WFF1VW5hd1ZCTnV4?= =?utf-8?B?MFA0dElCVEEyTEVWWE9aN3gya2VKYVl0UTVxZFU5a3hoVFNPSHFrZkFaRExt?= =?utf-8?B?MzVLTTRtMjRvajl3ekJkdjRvTW5QQWVtSDdDcFJmQ3psSFQ4bjhMaVpSN0Q2?= =?utf-8?B?RHhlUjFYTnlBcjMrR05jekVvNUpWOE9odWVSZDBrbHF6ZXpqdVFqRkhRPT0=?= 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)(1800799015)(376005)(7416005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NVV6TGpLZzJkRXFla2RIV1hkTCtzUFJOS3IvcXFMaW53RmMzcE5zTFR3UVRk?= =?utf-8?B?OUllK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VhZ21haW8wMklDYjJqK0Zn?= =?utf-8?B?OGkvM2pueDBpK1VvbktDeEFUSEdtMHdyUGNVN1VPYTBHdlZ3VVFRMXhyZGt0?= =?utf-8?B?cVFQYjNMZXErWjd2eXliaVRZelZuZjhIZC9BdzhIWlc1SVRFcnQ5OHd4TEdw?= =?utf-8?B?b1BLbzRXeWhleHYvVG5UcVNvSEVxOVNkRDBlQTVlUWJTcTVIWGszdTJlYnUx?= =?utf-8?B?WXlQVTQxNXdtdUFySi9KclEwUTNxQ1dGUEJLNmMwenhlNThKYnB5SCt5dWNo?= =?utf-8?Q?D+lk=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 275c24c0-b58f-4fa2-008d-08dc6ae47dec X-MS-Exchange-CrossTenant-AuthSource: MW3PR12MB4553.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2024 20:14:37.9040 (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: xDQH1ahkrWGC1MdMerZQ0Xi+dxMBDwcxPu9aqzaUp4VIWO5t2Bvh+JQwlG6J56QZ X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6550 Hi Peter, On 5/2/24 12:50, Peter Newman wrote: > Hi Babu, > > On Thu, May 2, 2024 at 9:25 AM Moger, Babu wrote: >> On 5/1/24 12:48, Peter Newman wrote: >>> The FS layer is informed by the arch layer (through rdt_resource >>> fields) how many assignable monitors are available and whether a >>> monitor is assigned to an entire group or a single event in a group. >>> Also, the FS layer can assume that monitors are indexed contiguously, >>> allowing it to host the data structures managing FS-level view of >>> monitor usage. >>> >>> I used the following resctrl_arch-interfaces to propagate assignments >>> to the implementation: >>> >>> void resctrl_arch_assign_monitor(struct rdt_domain *d, u32 mon_id, u32 >>> closid, u32 rmid, int evtid); >> >> Sure. I can add these in next version. >> >> Few comments.. >> >> AMD does not need closid for assignment. I assume ARM requires closid. > > Correct, MPAM needs a CLOSID+RMID (PARTID+PMG) to identify a > monitoring group. The CLOSID parameter is ignored on x86. > >> >> What is mon_id here? > > On ABMC, the value is programmed into L3_QOS_ABMC_CFG.CtrID ok. > > >> >>> void resctrl_arch_unassign_monitor(struct rdt_domain *d, u32 mon_id); >> >> We need rmid and evtid for unassign interface here. > > From my reading of the ABMC specification, it does not look necessary > to program BwSrc or BwType when changing L3_QOS_ABMC_CFG.CtrEn to 0 > for a particular CtrID. This interface only disables a counter, so it > should not need to know about how it was previously used when assign > is able to reassign, as assign will always reset the arch_mbm data. Yes. That is correct. We may not need to set BwSrc or BwType for unassign. But, we need evtid to update the monitor state of the rdtgroup. > > I do not see any harm in the arch_mbm data being stale while the > counter is unassigned, because the data is not accessed when reading > the hardware counter fails. In general, resctrl_arch_rmid_read() > cannot return any information if the hardware counter is not readable > at the time it is called. Ok. Le me check about keeping the stale arch_mbm data after unassign. It may be okay. > >> >> >>> >>> I chose to allow reassigning an assigned monitor without calling >>> unassign first. This is important when monitors are unassigned and >>> assigned in a single write to mbm_assign_control, as it allows all >>> updates to be performed in a single round of parallel IPIs to the >>> domains. >> >> Yes. It is not required to call unassign before assign. Hardware(AMD) >> supports it. >> >> But, we only have 32 counters. We need to know which counter we are going >> to use for assignment. If all the counters already assigned, then we can't >> figure out the counter id without calling unassigm first. Using the random >> counter will overwrite the already assigned counter. > > I made the caller of resctrl_arch_assign_monitor() responsible for > selecting which monitor to assign. As long as the user orders the > unassign operations before the assign operations in a write to > mbm_assign_control, the FS code will be able to find an available > monitor ID. How does assign_resctrl_arch_assign_monitor() selects the monitor id (or counter id) if all of them are assigned already. In this series the monitor ids are allocated using assign_cntrs_alloc. rdtgroup_assign_abmc() calls assign_cntrs_alloc() to get monitor id. It reports error if it cannot get free monitor id. Expectation is the user to unassign an event from another group(or the same group) before calling assign. Are you expecting something else here? > > >>> I chose to make this a mount option to simplify the management of the >>> monitor tracking data structures. They are simply allocated at mount >>> time and deallocated and unmount. >> >> Initially I added it as an mount option. >> Based on our earlier discussion, we decided to use the assign feature by >> default if hardware supports it. Users don't have to worry about the details. >>> >>> I called the option "mon_assign": The mount option parser calls >>> resctrl_arch_mon_assign_enable() to determine whether the >>> implementation supports assignment in some form. If it returns an >>> error, the mount fails. When successful, the assignable monitor count >>> is made non-zero in the appropriate rdt_resource, triggering the >>> behavior change in the FS layer. >>> >>> I'm still not sure if it's a good idea to enable monitor assignment by >>> default. This would be a major disruption in the MBM usage model >>> triggered by moving software between AMD CPU models. I thought the >> >> Why will it be a disruption? Why do you think mount option will solve the >> problem? As always, there will be option to go back to legacy mode. right? >> >>> safest option was to disallow creating more monitoring groups than >>> monitors unless the option is selected. Given that nobody else >> >> Current code allows to create more groups, but it will report "Monitor >> assignment failed" when it runs out of monitors. > > Ok that should be fine then. > > However, I don't think it's necessary to support dynamically changing > the usage model of monitoring groups without remounting. I believe it > makes it more difficult for the FS code to generically manage monitor > assignment. Are you suggesting to enable ABMC by default when available? Then provide the mount option switch back to legacy mode? I am fine with that if we all agree on that. -- Thanks Babu Moger