Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp433583lqg; Thu, 11 Apr 2024 07:22:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVXQiZmGVrfv1o2zIvrLxXQQtKy4dYXqgQyYK4ZJ+CWnFYfTpGsltIBsDQCKhfaEM0UVZJBjetxFeeG+h43Uw7DZYWuC+ZUvltgZecPfQ== X-Google-Smtp-Source: AGHT+IEssxxjHkvx0FraXP4f3e62NEUdbbdmfMFGPYhr73zwVf7nYsxzTqhg6mKBj+3nU7I13Gjr X-Received: by 2002:a17:902:b098:b0:1e2:7879:8be8 with SMTP id p24-20020a170902b09800b001e278798be8mr4652394plr.58.1712845353059; Thu, 11 Apr 2024 07:22:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712845353; cv=pass; d=google.com; s=arc-20160816; b=kIDnj3gaeg5h1tHezvh5HZJnb/p4jt3/2HK/89iEyeF2KgoCMGQeOEZbzsrpbEF9YD OvtClNW3qaM/5hf/d3Lsh08jIMglKg3435ge4BJcFnm1gVUPeQegY+TvUkYurLL88w+J N6CTDLrjuCUZrNumUqxSKnMhu/oPFi6JHtlBmzvyo6Z48RzqmeM/Zspkkl2mG/5Tuxpo Xo9uzz9YPAYiap0MHatCcqS39eOWphCGC2dDDCXmE6BFWRGlomrBuLUne9pKKzOV6/7E ShuvYfzwfTlXsSU1aJ7/0WH6XG1XTl5oJlO2blSTZjxm1bid35N/T6GFAhEIP2Frt7K/ xmkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=4p9b2VzOQVle/m5bQS2+HfTaKojJHGVpuYV3xGuWu7c=; fh=QpfXcl1MWRNwK/PrSFDaf8vyLNOqSjtq+qtJ/l97qlo=; b=ciFSTBj0dDx4Y7Osb2L+6FW1dB0vjSHSLemXLWiCna24ocofxpu8pQjYHe58+YzOcz uRlZW6ZYxI1rFSV/oPrzvwRNWXa+9nfGV+eiXVo0eh45k9K2br9CjZ9gc968gBMpmmtq +mZ1uYLUY/eTAVHpvkwfJh7h5idN8+TYzblNM9Uzvp29flzK9Y9jCVaQhgo3A3QT3wgu bD7e7VVSuldl4BqVwGgCWsXKvNyXQZwGqisklshX5GCZSTcosZuLMMnBcvHpCh4iKvJx sUH//I0KJqhNiS2Y1XdXjUqrDoGamy+xWVvEIHJ+u5pWrxBbcroSG/tCvfqdLo2nxasr sZbA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-140624-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140624-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b6-20020a170902650600b001e5886e2a55si32593plk.54.2024.04.11.07.22.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 07:22:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140624-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; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-140624-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140624-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 E0FB62883EC for ; Thu, 11 Apr 2024 14:18:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C03E14F111; Thu, 11 Apr 2024 14:16:54 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69CF314D43D for ; Thu, 11 Apr 2024 14:16:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712845013; cv=none; b=Zsr7X38/PLpKneOriX1URy/ccljl53UVkvaMy3X/6FAdOh7B5+kDfMMIzpqCyIDpOYBRMm+mMnio81V3qSpp2asNIkCc+iackugCTPHQ+J2Dv++W2sM2Ya4yqOzbwhgm30HlUBAD/YqJew/+5e9lOUbQwl+meTYqXVgMEWAcVYQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712845013; c=relaxed/simple; bh=pBWfsdVJzUKgs9OPZDeQg7dTF/g77QldF2IQKrKETUM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Az6QM8G3AhKdA7JxICdJC31HaGqxYT5uFQsyUoXbzlAvTxr2pDnvn26GD9e1typDNJFpy/++oBiAQh5dtCSurntmb7Z2QsY2rQFSm4mN0SrrAHWMsGcUzYdFzMyFsGQsLTRJ2IOoujKYwWuWpBJ53hjas4ZR6/WCEHkKR/eWi3E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 416BE339; Thu, 11 Apr 2024 07:17:21 -0700 (PDT) Received: from e133380.arm.com (e133380.arm.com [10.1.197.52]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E8BC53F64C; Thu, 11 Apr 2024 07:16:48 -0700 (PDT) Date: Thu, 11 Apr 2024 15:16:46 +0100 From: Dave Martin To: Reinette Chatre Cc: James Morse , x86@kernel.org, linux-kernel@vger.kernel.org, Fenghua Yu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Babu Moger , shameerali.kolothum.thodi@huawei.com, D Scott Phillips OS , carl@os.amperecomputing.com, lcherian@marvell.com, bobo.shaobowang@huawei.com, tan.shaopeng@fujitsu.com, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao , peternewman@google.com, dfustini@baylibre.com, amitsinght@marvell.com, David Hildenbrand , Rex Nie Subject: Re: [PATCH v1 17/31] x86/resctrl: Move mbm_cfg_mask to struct rdt_resource Message-ID: References: <20240321165106.31602-1-james.morse@arm.com> <20240321165106.31602-18-james.morse@arm.com> <966b7b32-6600-4b1f-9535-0298fedd57a7@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <966b7b32-6600-4b1f-9535-0298fedd57a7@intel.com> On Mon, Apr 08, 2024 at 08:21:24PM -0700, Reinette Chatre wrote: > Hi James, > > On 3/21/2024 9:50 AM, James Morse wrote: > > The mbm_cfg_mask field lists the bits that user-space can set when > > configuring an event. This value is output via the last_cmd_status > > file. > > > > Once the filesystem parts of resctrl are moved to live in /fs/, the > > struct rdt_hw_resource is inaccessible to the filesystem code. Because > > this value is output to user-space, it has to be accessible to the > > filesystem code. > > > > Move it to struct rdt_resource. > > > > Signed-off-by: James Morse > > .. > > > diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h > > index 975b80102fbe..8a7367d1ce45 100644 > > --- a/include/linux/resctrl.h > > +++ b/include/linux/resctrl.h > > @@ -140,6 +140,8 @@ struct resctrl_membw { > > * @format_str: Per resource format string to show domain value > > * @evt_list: List of monitoring events > > * @fflags: flags to choose base and info files > > + * @mbm_cfg_mask: Bandwidth sources that can be tracked when Bandwidth > > + * Monitoring Event Configuration (BMEC) is supported. [...] > Reinette > > BMEC is an AMD term. If MPAM is planning to use this member then this comment > should be made generic. MPAM can (at least) filter reads and/or writes, and it looks like James is expecting to support this. However, it probably does make sense to keep the comments neutral in a common header. Would the following work? * @ mbm_cfg_mask: Arch-specific event configuration flags I think that's broad enough to cover all bases, but I'll wait for your response. Cheers ---Dave