Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp454435lqg; Thu, 11 Apr 2024 07:54:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUZ1OEpLt7hVIyNMKhaSi+1Rhd8N9WcjAjn24HLSJgJzSiC1aKpM9/brhEq0ZCpsi6EMTJc5LbZ9Evofleud6irRwWGvdNUiK860eTSmQ== X-Google-Smtp-Source: AGHT+IGWk8qPlnSAHBUOAUfjKwZxwt3nMcz8s5tqNsEcN8X0Z4aJ1tt4js3gcC8wGEwzUzPrJNfk X-Received: by 2002:a17:902:ec83:b0:1e2:9ac2:4a03 with SMTP id x3-20020a170902ec8300b001e29ac24a03mr5470345plg.28.1712847280231; Thu, 11 Apr 2024 07:54:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712847280; cv=pass; d=google.com; s=arc-20160816; b=qXDwC54fmn9kkNhhaVlt1OKDU/6W05OfDev02dl1q+mqrbqxXupgISAfcp3cqKxkLK vtLgNQ68l2pEtlVoMmNDMboLWnhfuoogqkD24hpJl2/twZn4tExO2yhZMujUYEZWj/gk H4KNTWSeR7UcMxi6sBeK3ITRf2sBS1hmB7NgsEhNTVnHfpYCk9vPg45jgq0NQpUPT14F n6WvuCty27Lni0RC7d2rMSQ8XBBCg+qEhMTst6vtMIsF0a8lBShMWTgo/v5OutQtXJSa eWk/E+gYPfUgRzdhoGSX+paEnismwGDxqiwuuZympnMgE8oMNarzigXwxjNpDYLg+Ndy TYpg== 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=oGC6WRzadFE6dtoJKms+7oMUG8FxwNvD7CwD45kdJAc=; fh=QpfXcl1MWRNwK/PrSFDaf8vyLNOqSjtq+qtJ/l97qlo=; b=bbonlTLRMDgCh8REEZ8NZZ4390SiQmLQoxb0HNnR4OYCe9w1Qq9ngWFMfiZC1v/d93 jrgXeP8cQi5GBQymW6KT8iQAtDcvUVoSgFJfUoAyXy+Z0OGQePs5Ox8V6BRGERIMx6qU u4ZwVq9OyusHWS10K2OBAEE0mPLIqSCG+d6XZrOTdzn0FM6tX2A4V0IUTTRwESuH+Hr6 1soNdDG1F5aK1E8chIbVnHHVk0sN7MArROXxKmyfA2P/skVOW51SBQ9dVy6arxq41G0M rEHkoSH1n+FE+X7Sbf1jHTPXgJdXLVyHIjYSGAC3JGRFxDzkSBkxvx5UdlMWrCCm7F1z Rlug==; 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-140647-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140647-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id z5-20020a170903018500b001dc6699f553si1375590plg.360.2024.04.11.07.54.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 07:54:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140647-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; 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-140647-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140647-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 02BF1B2D3A8 for ; Thu, 11 Apr 2024 14:28:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61E2214EC40; Thu, 11 Apr 2024 14:28:52 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AACEE1E516 for ; Thu, 11 Apr 2024 14:28:50 +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=1712845731; cv=none; b=db4XijAsRAYPmRDwRNsK+0rIAzStiqlgrd004UYAUYDGMKSM0LotBH4lv0X9sys/9U4lheMWqYQK0f8lBNbGYLsiNd3SZuEuyESjq/4P/4XXkIvgW0rbWuN9bdNKO2SJmE9gTDfamftYx38P6WabC7q1KAQrLRKEW70CXheJPig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712845731; c=relaxed/simple; bh=zIPKsy14lY3vPwb7exGbuCetT9iThntwPT7HQt2IwgI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jOI6xFu/8Sz2Hy99FabgfGBGVNCVogcyCotCM2MsA6D6YF2odD0iuq/9sgCdejLqpcBQHOCaDWwLbfSB6HQuyyQKwaqU52gRtbQd2tZbWzx5Q+Hnt+fEAvz+h1WuER2PmAS9whBmEHsR7uxO24d2ymNvdOPONrYeGPhe8MHS8fE= 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 8BFAF339; Thu, 11 Apr 2024 07:29:19 -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 3F38B3F64C; Thu, 11 Apr 2024 07:28:47 -0700 (PDT) Date: Thu, 11 Apr 2024 15:28:44 +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 30/31] x86/resctrl: Move the filesystem bits to headers visible to fs/resctrl Message-ID: References: <20240321165106.31602-1-james.morse@arm.com> <20240321165106.31602-31-james.morse@arm.com> <8f4a05d5-2040-4cf2-8c05-a190c25d64db@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: <8f4a05d5-2040-4cf2-8c05-a190c25d64db@intel.com> On Mon, Apr 08, 2024 at 08:42:00PM -0700, Reinette Chatre wrote: > Hi James, > > On 3/21/2024 9:51 AM, James Morse wrote: > .. > > diff --git a/include/linux/resctrl_types.h b/include/linux/resctrl_types.h > > index 4788bd95dac6..fe0b10b589c0 100644 > > --- a/include/linux/resctrl_types.h > > +++ b/include/linux/resctrl_types.h > > @@ -7,6 +7,36 @@ > > #ifndef __LINUX_RESCTRL_TYPES_H > > #define __LINUX_RESCTRL_TYPES_H > > > > +#define CQM_LIMBOCHECK_INTERVAL 1000 > > + > > +#define MBM_CNTR_WIDTH_BASE 24 > > +#define MBM_OVERFLOW_INTERVAL 1000 > > +#define MAX_MBA_BW 100u > > +#define MBA_IS_LINEAR 0x4 > > + > > +/* rdtgroup.flags */ > > +#define RDT_DELETED 1 > > + > > +/* rftype.flags */ > > +#define RFTYPE_FLAGS_CPUS_LIST 1 > > + > > +/* > > + * Define the file type flags for base and info directories. > > + */ > > +#define RFTYPE_INFO BIT(0) > > +#define RFTYPE_BASE BIT(1) > > +#define RFTYPE_CTRL BIT(4) > > +#define RFTYPE_MON BIT(5) > > +#define RFTYPE_TOP BIT(6) > > +#define RFTYPE_RES_CACHE BIT(8) > > +#define RFTYPE_RES_MB BIT(9) > > +#define RFTYPE_DEBUG BIT(10) > > +#define RFTYPE_CTRL_INFO (RFTYPE_INFO | RFTYPE_CTRL) > > +#define RFTYPE_MON_INFO (RFTYPE_INFO | RFTYPE_MON) > > +#define RFTYPE_TOP_INFO (RFTYPE_INFO | RFTYPE_TOP) > > +#define RFTYPE_CTRL_BASE (RFTYPE_BASE | RFTYPE_CTRL) > > +#define RFTYPE_MON_BASE (RFTYPE_BASE | RFTYPE_MON) > > + > > /* Reads to Local DRAM Memory */ > > #define READS_TO_LOCAL_MEM BIT(0) > > > > Not all these new seem to belong in this file. Could you please confirm? > > For example: > Earlier in series it was mentioned that struct rdtgroup is private to the > fs so having RDT_DELETED is unexpected as it implies access to struct rdtgroup. > > CQM_LIMBOCHECK_INTERVAL seems private to the fs code, so too > RFTYPE_FLAGS_CPUS_LIST. > > Reinette > I'll flag this for James to review. These have to be moved out of the x86 private headers, but you're right that some of them seem logically private to the resctrl core. I guess some of these could move to fs/resctrl/internal.h? OTOH, might it be preferable to keep all the flag definitions for a given member together for ease of maintenance, even if some are for resctrl internal use only? Cheers ---Dave