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 26EE225D53B for ; Sat, 6 Jun 2026 05:23:47 +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=1780723429; cv=none; b=FRgUFSLb7OUVbLTEYmrZ3JDKw/zU08LPbBhXglLt2ahxCCmV9wNuJU8ais4jFgRAYs+P2bD5IYZshQ4S/SdZsnMQVfSX3ZeoU8KuOgHo7zYG7pWPswxFnYBEkMPXPVMVSvv1a5Tp7X4Dywbvb93jQuQ8nU/rYpKroOsH/oqbJKY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780723429; c=relaxed/simple; bh=ZBMzYMDccNhYxhXwo3uBX90e3WiVUJrHoCJYOHQ7nR0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CN+ROe64gA3vTQeRw0DQXhOdu+Yv9OXQc+ylmVw9IolR9hIJXo5xyAAPw28paHoJjdBnhMiGbUE4HBKxb2Q+GC67iG38FrUeFG9izWyrv6DRQuSli1eEGzuexyMkq7+fIhsstzRT/oZjW430Koxf4L2Zrat62Tskq8E4Q30ijvc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WUWyE6Zl; 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="WUWyE6Zl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7DA5A1F00893; Sat, 6 Jun 2026 05:23:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780723427; bh=xPNdSGrVQEXNLI4pk5dT2qjFEVmbJhAw8RQ40/wXezM=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=WUWyE6Zl/eXNpXNRzVqGK4WyP2DnU6irn38NrFm1IVOY6htoN8+eFq+835s2PWhAg +4I624mM9eMBPiCyJwsgveIOQqPrVhjqFiiz9KRglSaBjG8hOYWJJZ2uY0+NWtmmh1 kumbkUie/sEoiis028zw7tgA7bjzrGIAjJFrbY/VUSC+AfWGKPlmmn94lM+CqW28Gw TnWfNPygsAmcLTBSp6hSWsY/a4GQUbmoe7lfhgGWF0G+tRhJM+LQ923sWRCmXylUfb ho8THf9NaS6SmDmyfbac4M3vkqA3nZtzii0ABK3GtQsu82QZWQR0UXmT6EBbdvMx9E 1dqeQhS3hJRwA== Date: Fri, 5 Jun 2026 22:23:46 -0700 From: Drew Fustini To: Reinette Chatre Cc: Ben Horgan , Tony Luck , 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: <29c95b69-e1a4-46b1-ab8b-45c09308b924@arm.com> <5e575bc2-e67f-4696-9332-33c54023c057@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: 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