Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2546756lqo; Mon, 20 May 2024 09:00:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX/5XhfUgL69uFmKN2jikb94vXig6G+rdc8PIIxpv49v8PQ4xUCVrOIsslPVvlu0vzP8Gt1MYGzU99o6IcaktZ0B9LlEFKxbvKPCnkeKQ== X-Google-Smtp-Source: AGHT+IF0WwoNFPyy8uCQtYrFnOn9546To5UUS4oS6UrlzS7cymedUpVWsUyv4dk4fBRDfpXuqAi8 X-Received: by 2002:a05:6a20:9191:b0:1af:ad23:3d7b with SMTP id adf61e73a8af0-1afde197906mr44647435637.44.1716220850803; Mon, 20 May 2024 09:00:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716220850; cv=pass; d=google.com; s=arc-20160816; b=yUmPjgKFwanqCMRC0dygkAdOMdJB//9A+IN9YqjhSqPCuIVhTd6qcDsST87vAEFzqL Nf8u4mcI8r4Rtk92Yar9GE5hqsxGQR5dbBF5lqVM4YPLsZnb5A4Wmn/h7As1attuH+sy 4HaNDzy1qqdptZfgTFj8xuQ9gBtdBIbtBnygK29grQZXnp8yg72ZGPEDpYo24Cp0buUf 2ATgkp+6msivGB7Lba/gX2ursdcWJ7UCPdulUVENMLZmJlP/ThMtpw8CeW8GHaSVC6k7 4tUFhargTkxhDGha/BnraqvqOA2FmoxX4Q0N99zIAuQ2pvYNKCJ6aJ3HqLPrx85n5lOD IBkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=74OgddEij1CdKOr7nsQpcxRgDTjS/dIJGQiYkK7+pOo=; fh=7bYl7lHD/v0ZnAUXFSM6AqVLx3z4shUoBFj6TLtElQI=; b=NSsgv8fjTKmFHrmooct5g9/pC/WrEzbSD1jXrZc/wOEG8s3CUgXXKflKHzH7ndRPYK 1FEDVHJ3B3fI/zIzqopV6NOC0hjW1if+S0n/gevD877sC2kEdjXu8Zpqa3GPpTUqn9AB N8qMpzl5QINF8Srryi7mFmD9CnKFr0w3ZxE13rDXh5nDgLpSjS2fcai2l0FEl7v1YZEU MlZbAATwvVAN8uDYfToAhQwAQq1+VPnl6hsFGRcdRJaE67ITDOvokuJvQ3D3kPsm+mLQ JduYJC4VtKMWAuE+dNMK9mYeNzfLhC2KGhzP0M0gpUhj6cU19y9jOZmY/D845mTD2dIJ u6Wg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=b1AeUqz0; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-183946-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183946-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-65811b6850esi7164091a12.811.2024.05.20.09.00.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 09:00:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183946-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=b1AeUqz0; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-183946-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183946-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 519E6B20B68 for ; Mon, 20 May 2024 16:00:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 302E613775F; Mon, 20 May 2024 16:00:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="b1AeUqz0" Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3D5E28E7 for ; Mon, 20 May 2024 16:00:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716220835; cv=none; b=KVCww3z4YxDLrel6ovXQwU+JHvecOO++BvSehAUeHbq4Q8orlo6SC3AHX7r6uIL9+NPnHPWLGv2P7H78/noQuHUpUPpDVqSefNFmneaT/wQmk96Y7pMdvfv8ZhjxJGXyhcb4Gjil9xM5cOBCJ70OhMh6pS/JqsRgIIjuOuDHYew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716220835; c=relaxed/simple; bh=74OgddEij1CdKOr7nsQpcxRgDTjS/dIJGQiYkK7+pOo=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=AatEX+yIz5xS+zLkDrIQu65/FFG6J75Jen0HMzmp+cO1X4lz5aXhnFAvzkPmCTNUWnzTamlArgW1rYrpMeZu36rO+JGiqVKhRU9Ky2GDDXU7eOhu1BKvwZS+rhpjnWMDyhMSfWJqMYGxlRCAC522/KGmZOn1UxEOgTCz58H+v4A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=b1AeUqz0; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1eed90a926fso212745ad.0 for ; Mon, 20 May 2024 09:00:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1716220833; x=1716825633; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=74OgddEij1CdKOr7nsQpcxRgDTjS/dIJGQiYkK7+pOo=; b=b1AeUqz02OpA8o9wkiSz8IlCJRicor/iyim0+DI9RavFz/r3c6gGcw3YFSqMthTVcZ /CSK7CknBtkwjq0gpxxJmeZ8+KDkKREdX1Jv34I7C/VHCT0OQODnuQh0SGTGM9aHq3M2 wKFErOB6eGhaze6q/ZNBao1YrsROmLfP4zkglxKhu34uHsCja9GATPUdDuwdjgU8sXkM zZJQxFuTysJLbpGNLbRp60PT4fMI03HbdSrhwNYYkoaBtLOBn9lcn9Aw/s1M9Fj3IM1t +j+a7AhRZXFQ0CbOxPptYiYySlqnK2AiOTqmDRLhPNCOaB2TzFNB4G2OFw2P2/p/Xlcm V98A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716220833; x=1716825633; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=74OgddEij1CdKOr7nsQpcxRgDTjS/dIJGQiYkK7+pOo=; b=oxAXtlvOOLymWxFivDTvJyUs1S67XrYbsPOG4SFxZqkEkQ4LKGuJTydHbOMXsXyFSV 7ODH+3i8mxoacGgF4wCwyfaMCpHvIvHt91Xiaodw6T9ytVcYGi02AQXmvmpDtFWhWZR/ 1TZMiB2bku/PH2zmC/S5VD5bQP0Yyi2/QIcbGDQcWvn2v3rZMdeuEZ/fN84SxgKwL+LD Hgjm/vAp92gdZUneVEyD/+PGMbrhyq7gfotOAcqR8XICgYFRDBu28WqWdlkG8yoO+JiN PoXl2xxOAErhd52tUvrt9q84bwKhIsHMYTKhyBwmNr3AwOvz0oIBwUMn7+Q4mwXC5IvV iuzg== X-Forwarded-Encrypted: i=1; AJvYcCUde41TeWEi92jgDQJsCmk57q4ZVOJxSHWAWeTQfoSgHf55O76wLYW19h57RQkFkeYXEGS+Ut+3dVVuhpMycPlJTc2uS2N9v2MNJB/0 X-Gm-Message-State: AOJu0Yz35JpHdq9yk/fvPdRfrIsw+iyKmmrKTSxYR8TUyCFJdd5LeeRV Sa+EEzngRH4nKzfsGa6ns2rQR1LB/m2a0NCtbV8P26/giQr2Yj6vb3XmQnOGgkJD57hyvro4JVG YjFQXZ1Qa8EXZyB+G4k7pRXLFbhKzOu1eT2ub X-Received: by 2002:a17:902:c395:b0:1e2:1955:1b1c with SMTP id d9443c01a7336-1f2ee0ec936mr3283225ad.27.1716220832548; Mon, 20 May 2024 09:00:32 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <6edffe1b-e9a9-4995-8172-353efc189666@amd.com> In-Reply-To: From: Peter Newman Date: Mon, 20 May 2024 09:00:19 -0700 Message-ID: Subject: Re: [RFC PATCH v3 00/17] x86/resctrl : Support AMD Assignable Bandwidth Monitoring Counters (ABMC) To: babu.moger@amd.com Cc: Reinette Chatre , corbet@lwn.net, fenghua.yu@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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Babu, On Mon, May 20, 2024 at 7:25=E2=80=AFAM Moger, Babu wr= ote: > > Hi Peter, > > On 5/17/24 16:51, Peter Newman wrote: > > Hi Reinette, Babu, > > > > On Fri, May 3, 2024 at 2:15=E2=80=AFPM Reinette Chatre > > wrote: > >> > >> Hi Peter, > >> > >> On 5/3/2024 2:00 PM, Peter Newman wrote: > >>> Hi Babu, > >>> > >>> On Fri, May 3, 2024 at 1:44=E2=80=AFPM Moger, Babu w= rote: > >>>> > >>>> Hi Peter, > >>>> > >>>> On 5/2/2024 7:57 PM, Peter Newman wrote: > >>>>> Hi Reinette, > >>>>> > >>>>> On Thu, May 2, 2024 at 4:21=E2=80=AFPM Reinette Chatre > >>>>>> I do think ABMC should be enabled by default when available and it= looks > >>>>>> to be what this series aims to do [1]. The way I reason about this= is > >>>>>> that legacy user space gets more reliable monitoring behavior with= out > >>>>>> needing to change behavior. > >>>>> > >>>>> I don't like that for a monitor assignment-aware user, following th= e > >>>>> creation of new monitoring groups, there will be less monitors > >>>>> available for assignment. If the user wants precise control over wh= ere > >>>>> monitors are allocated, they would need to manually unassign the > >>>>> automatically-assigned monitor after creating new groups. > >>>>> > >>>>> It's an annoyance, but I'm not sure if it would break any realistic > >>>>> usage model. Maybe if the monitoring agent operates independently o= f > >>>> > >>>> Yes. Its annoyance. > >>>> > >>>> But if you think about it, normal users don't create too many groups= . > >>>> They wont have to worry about assign/unassign headache if we enable > >>>> monitor assignment automatically. Also there is pqos tool which uses > >>>> this interface. It does not have to know about assign/unassign stuff= . > >>> > >>> Thinking about this again, I don't think it's much of a concern > >>> because the automatic assignment on mongroup creation behavior can be > >>> trivially disabled using a boolean flag. > >> > >> This could be a config option. > > > > I'd like to work out the details of this option. > > > > info/L3_MON/mbm_assign_on_mkdir? > > > > boolean (parsed with kstrtobool()), defaulting to true? > > I am thinking is not a big concern. We only have limited (32) counters. > Automatic monitor assignment works only for first 16 groups(2 counters fo= r > each group). When the counters are exhausted auto assignment does not > work. In your case(with more than 16 groups) the auto assignment does not > work. I feel having a config option is really not necessary. I'm not sure I follow the argument you're trying to make because it doesn't sound like an argument against adding a config option. What exactly do you mean by "work" vs "not work"? Also it doesn't address my original concern about needing to manually (and non-atomically) undo the auto assignment in order to account for where the monitors are assigned or ensure that creating a new monitoring group will succeed. -Peter