All of lore.kernel.org
 help / color / mirror / Atom feed
From: Drew Fustini <fustini@kernel.org>
To: Reinette Chatre <reinette.chatre@intel.com>
Cc: Ben Horgan <ben.horgan@arm.com>, Tony Luck <tony.luck@intel.com>,
	James Morse <james.morse@arm.com>,
	Dave Martin <Dave.Martin@arm.com>,
	Babu Moger <babu.moger@amd.com>, Fenghua Yu <fenghuay@nvidia.com>,
	Chen Yu <yu.c.chen@intel.com>, Borislav Petkov <bp@alien8.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Peter Newman <peternewman@google.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] mpam,x86,fs/resctrl: Generic schema description Proof of Concept
Date: Fri, 5 Jun 2026 22:23:46 -0700	[thread overview]
Message-ID: <aiOu4pJmUmFiyxlu@thelio> (raw)
In-Reply-To: <aiOrznnZjTGywMna@thelio>

On Fri, Jun 05, 2026 at 10:10:38PM -0700, Drew Fustini wrote:
> On Fri, Jun 05, 2026 at 12:35:51PM -0700, Drew Fustini wrote:
> > > As I mentioned in response to Ben [2] there seems to be a mismatch between
> > > architecture requirements here. resctrl uses the value returned by 
> > > resctrl_get_default_ctrlval() as the control value that means "no throttling".
> > > For Intel this means min == max but this does not seem to be the case for MPAM
> > > and CBQRI. I am not familiar enough with either to have an alternative proposal here
> > > so I need to become familiar now. There is a bit of backlog on other resctl
> > > work right now so this will take me some time to sort out.
> > 
> > Thanks for pointing this out. In that case, it doesn't seem to match
> > what I was thinking of for MB_MIN. The CBQRI reserved bandwidth blocks
> > Rbwb) control can be thought of as a minimum amount of guranteed
> > bandwidth for a control group. Each RCID (e.g. CLOSID) must be assigned
> > at least 1 bandwidth block per the spec. Therefore, the membw.min_bw
> > would need to be 1.
> > 
> > There is also a max bandwidth reservation across all control groups
> > (RCIDs / CLOSIDs) so that there will be some amount of unreserved
> > bandwidth. Mweight (1-255) controls how much of that unreserved
> > bandwidth pool that a group can use. Mweight of 0 means no shared
> > bandwidth. I think the membw.min_bw would need to 255 so that all groups
> > get equal share of the unreserved pool.
> 
> Sorry, I wasn't thinking about this right. If Mweight is used for MB,
> then membw.max_bw would be 100 (MAX_MBA_BW) and membw.min_bw would be 0
> which means no shared bandwidth. 
> 
> > It seems like that would be incorrect use of membw.min_bw in both cases?
> 
> The issue is really just for Rbwb (reserved bandwidth) as that needs to
> default to the minimum of 1. What about introducing membw.reset_val
> which would be returned by resctrl_get_default_ctrl()?
> 
> MB could set membw.reset_val to be the same value as membw.max_bw.
> 
> > > > There is no equivalent to MB (percentage throttle) in RISC-V so I would
> > > > want it to be valid to have MB_MIN (minimum reservation) without MB.
> > > > 
> > > > I rebased my RISC-V CBQRI v6 series on top of this proof of concept and
> > > > was able to validate it works okay in Qemu:
> > > > 
> > > > MB_WGHT:72=255
> > > >  MB_MIN:72=756
> > > >      L2:64=fff;65=fff
> > > >      L3:75=ffff
> > > 
> > > Ideally any new support should not break existing user space and the existing
> > > user interface expects a MB entry in the schemata file when the MB resource exists.
> > > Is it possible to emulate the percentage based MB control with MB_WGHT or MB_MIN?
> > > This sounds similar as what is/was planned for MPAM [2].
> > 
> > Yes, I think that Mweight could be mapped to the MB concept of
> > throttling. All groups could start with the max Mweight of 255 which
> > could can be represented as 100%. 
> > 
> > However, I'm not sure what to do about membw.min_bw. Mweight = 0 means
> > it can not use any of the shared unreserved bandwidth pool. If
> > resctrl_get_default_ctrlval() is designed to mean "no throttling", then
> > it seems like the membw.min_bw would need to be 255. But that feels
> > weird for the min_bw value to be equal to the max weight for unreserved
> > bandwidth.
> 
> MB would have the typical membw.min_bw = 100, and
> resctrl_get_default_ctrl() would return 100. The controller would be
> programmed with Mweight 255 for 100%.

Sorry - I meant MB would have membw.max_bw = 100 which would cause CBQRI
bandwidth controller to be programmed with Mweight = 255.

Drew

  reply	other threads:[~2026-06-06  5:23 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29 18:06 [RFC] mpam,x86,fs/resctrl: Generic schema description Proof of Concept Reinette Chatre
2026-06-02 20:23 ` Babu Moger
2026-06-02 22:56   ` Reinette Chatre
2026-06-03  1:14     ` Moger, Babu
2026-06-03  3:55       ` Reinette Chatre
2026-06-03 14:40         ` Babu Moger
2026-06-02 23:32 ` Chen, Yu C
2026-06-03  3:45   ` Reinette Chatre
2026-06-03 11:53     ` Chen, Yu C
2026-06-04 16:37       ` Reinette Chatre
2026-06-05 15:43         ` Chen, Yu C
2026-06-05 16:20           ` Reinette Chatre
2026-06-03 15:15 ` Ben Horgan
2026-06-03 19:34   ` Drew Fustini
2026-06-04 11:24     ` Ben Horgan
2026-06-04 17:38       ` Drew Fustini
2026-06-04 21:05     ` Reinette Chatre
2026-06-05 19:35       ` Drew Fustini
2026-06-06  5:10         ` Drew Fustini
2026-06-06  5:23           ` Drew Fustini [this message]
2026-06-04 17:43   ` Reinette Chatre
2026-06-05 14:53     ` Ben Horgan
2026-06-05 15:39       ` Reinette Chatre
2026-06-05 16:37         ` Ben Horgan
2026-06-03 18:46 ` Luck, Tony
2026-06-04 10:02   ` Ben Horgan
2026-06-04 21:42   ` Reinette Chatre
2026-06-03 22:14 ` Drew Fustini
2026-06-04 21:47   ` Reinette Chatre
2026-06-05 19:48     ` Drew Fustini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aiOu4pJmUmFiyxlu@thelio \
    --to=fustini@kernel.org \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.com \
    --cc=ben.horgan@arm.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=fenghuay@nvidia.com \
    --cc=james.morse@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peternewman@google.com \
    --cc=reinette.chatre@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=yu.c.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.