Re: [PATCH] fs/resctrl,x86/resctrl: Factor mba rounding to be per-arch

From: Chen, Yu C

Date: Sat Oct 11 2025 - 13:15:33 EST


On 10/11/2025 12:48 AM, Reinette Chatre wrote:
Hi Dave,

On 9/30/25 8:40 AM, Dave Martin wrote:
On Mon, Sep 29, 2025 at 09:09:35AM -0700, Reinette Chatre wrote:
On 9/29/25 6:56 AM, Dave Martin wrote:
On Thu, Sep 25, 2025 at 03:58:35PM -0700, Luck, Tony wrote:
On Mon, Sep 22, 2025 at 04:04:40PM +0100, Dave Martin wrote:

[snip]

Anyway, going back to the "#" convention:

If the initial read of schemata has the new entries "pre-commented",
then userspace wouldn't need to know about the new entries. It could
just tweak the MB entry (which it knows about), and write the file back:

MB: 0=43
# MB_HW: 0=2
# MB_MIN: 0=1
# MB_MAX: 0=2

then resctrl knows to ignore the hashed lines, and so reading the file
back gives:

MB: 0=43
# MB_HW: 0=3
# MB_MIN: 0=2
# MB_MAX: 0=3


May I ask if introducing the pre-commented lines is intended to prevent
control conflicts over the same MBA? If this is the case, I wonder if,
instead of exposing both MB and the pre-commented MB_HW_X in one file,
it would be feasible to introduce a new mount option (such as "hw") to
make the legacy MB and MB_HW_X mutually exclusive. If the user specifies
"hw" in mount option, display MB_HW_X (if available); otherwise, display
only the legacy "MB". This is similar to the cpufreq governor, where only
one governor is allowed to adjust the CPU frequency at a time.

thanks,
Chenyu