From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 94E5143D518 for ; Wed, 3 Jun 2026 22:14:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780524853; cv=none; b=H6MCIP1Y0FWiNQYI87ErS4I3fcB6Xcn3l3QqoGZyt4om7IvPzxD2vEbIKJAzfyTIhY2aQrsYNXd0DfAQnY0yTMD3CusI8PyZaktTRVCjbpdAjSOKG6uBe6GLFO1uVHW8ABOLOxe/Fu+bfElH/Vj7S6NH+Tb3ERgVTyien8/j90A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780524853; c=relaxed/simple; bh=FZ8IlI9HGHMOh6eWNkCrvyJPC9KQ//1PVi7oi9pmV4Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RZJKcspxkQJEBoH5nTrFfAQxEfoakp7+XkW018VPjhVf//GDJOv3tLwPIiFFbHSrdZZL8mAxS57iFamOCcxhZx/M1qwrtVvEyKtJFmckapBWRYkdUqp4y8kR8aMWnPPBMMGFmAZRrNMJoNdGvdVWieW5+EEyTWk+ZYEFLwOHVSY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TPlab5ha; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TPlab5ha" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E866E1F00893; Wed, 3 Jun 2026 22:14:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780524851; bh=NBmNAR8i0FfhGwOeTPQp2jeMiBtVZY5OL2bjBfO+JAc=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=TPlab5haNwWLrc8a6t5PoTe72mKyiO3Cvj7JcURyjF6khJtwK6ANU6wcrelkF65ib sL6/D/GH11iiMPHRu6eH+PxmazpBYaCZwu7NL2pzL1izFzcMiq62H5zBMgBKWc2436 uq4dElLyaJp1F+j+hmPVwWyyYSbRApBfoldyRhRVdK2mHamjv+jH/kV4a0fixzkV+V +21tMSsJYsGUA319HSkroFKS5EtOu2NYLCD4CiVZV8IW+roy1QoKpB0R6aMMswuUje WPa4Vw3xo8w/iVM6PZhtrW9lNxv5PAOef1psqKAe+o96of2R64KCKJ/ll16W8LBXGC no6HdA5HV95NQ== Date: Wed, 3 Jun 2026 15:14:09 -0700 From: Drew Fustini To: Reinette Chatre Cc: Tony Luck , Ben Horgan , James Morse , Dave Martin , Babu Moger , Fenghua Yu , Chen Yu , Borislav Petkov , Thomas Gleixner , Dave Hansen , Peter Newman , "x86@kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [RFC] mpam,x86,fs/resctrl: Generic schema description Proof of Concept Message-ID: References: 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: On Fri, May 29, 2026 at 11:06:07AM -0700, Reinette Chatre wrote: > /** > * struct resctrl_ctrl - A resource control > * @entry: List entry of rdt_resource::controls > * @scope: Scope of the resource that this control allocates > * @domains: RCU list of all control domains > * @type: The control type that determines the properties of the control, > * format string for displaying control values to user space, and > * parser of control values provided by user space. > * @name: Name of the control. Appended to final resource name > * (rdt_resource_final::name) to create final schema entry. > * Specifically, "rdt_resource_final::name"_"resctrl_ctrl::name". > * For example, with resource name "MB" and control name "MAX" the > * schema entry will be "MB_MAX". > * @cache: Cache allocation control properties. > * @membw: Bandwidth control properties. > */ > struct resctrl_ctrl { > struct list_head entry; > enum resctrl_scope scope; > struct list_head domains; > enum resctrl_ctrl_type type; > enum resctrl_ctrl_name name; > union { > struct resctrl_cache cache; > struct resctrl_membw membw; > }; > }; > > Two members summarize how this new structure fits into the rest of resctrl: > a) resctrl_ctrl::entry > Since a resource can support multiple controls there is a new list > in struct rdt_resource named "controls" that contains the list of all > controls supported by the resource. > b) resctrl_ctrl::domains > Instead of the list of control domains belonging to a resource they > now belong to the control self. By doing so resctrl can support resource > controls at different scope for the same resource. This is intended to > support some upcoming MPAM and RISC-V usages. The ability to change scope is much needed for RISC-V. There are compromises in my RFC [1] as a result of trying to map everything to either L2 or L3 scope. I would also like to see a non-cpu cache scope for monitoring too, but would that be better discussed outside the context of this proof of concept? Thanks, Drew [1] https://lore.kernel.org/all/20260601-ssqosid-cbqri-rqsc-v7-0-v6-0-baf00f50028a@kernel.org/