[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fa20041b-21e2-488e-88fb-ab49a8e24fb8@arm.com>
Date: Mon, 10 Nov 2025 11:06:32 +0000
From: Ben Horgan <ben.horgan@....com>
To: Dave Martin <Dave.Martin@....com>, linux-kernel@...r.kernel.org
Cc: Tony Luck <tony.luck@...el.com>,
Reinette Chatre <reinette.chatre@...el.com>,
James Morse <james.morse@....com>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>,
Jonathan Corbet <corbet@....net>, x86@...nel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH v2] x86,fs/resctrl: Factor MBA parse-time conversion to be
per-arch
Hi Dave,
On 10/31/25 15:41, Dave Martin wrote:
> The control value parser for the MB resource currently coerces the
> memory bandwidth percentage value from userspace to be an exact
> multiple of the rdt_resource::resctrl_membw::bw_gran parameter.
>
> On MPAM systems, this results in somewhat worse-than-worst-case
> rounding, since the bandwidth granularity advertised to resctrl by the
> MPAM driver is in general only an approximation to the actual hardware
> granularity on these systems, and the hardware bandwidth allocation
> control value is not natively a percentage -- necessitating a further
> conversion in the resctrl_arch_update_domains() path, regardless of the
> conversion done at parse time.
>
> Allow the arch to provide its own parse-time conversion that is
> appropriate for the hardware, and move the existing conversion to x86.
> This will avoid accumulated error from rounding the value twice on MPAM
> systems.
>
> Clarify the documentation, but avoid overly exact promises.
>
> Clamping to bw_min and bw_max still feels generic: leave it in the core
> code, for now.
>
> No functional change.
>
> Signed-off-by: Dave Martin <Dave.Martin@....com>
>
Seems sensible and helpful for MPAM.
Reviewed-by: Ben Horgan <ben.horgan@....com>
Thanks,
Ben
Powered by blists - more mailing lists