Re: [PATCH v4 26/41] arm_mpam: resctrl: Add support for 'MB' resource
From: Ben Horgan <ben.horgan@arm.com>
Date: 2026-02-18 16:42:26
Also in:
kvmarm, linux-doc, lkml
Hi Shaopeng, On 2/10/26 06:20, Shaopeng Tan (Fujitsu) wrote:
Hello Ben,quoted
From: James Morse <james.morse@arm.com> resctrl supports 'MB', as a percentage throttling of traffic from the L3. This is the control that mba_sc uses, so ideally the class chosen should be as close as possible to the counters used for mbm_total. If there is a single L3 and the topology of the memory matches then the traffic at the memory controller will be equivalent to that at egress of the L3. If these conditions are met allow the memory class to back MB. MB's percentage control should be backed either with the fixed point fraction MBW_MAX or bandwidth portion bitmaps. The bandwidth portion bitmaps is not used as its tricky to pick which bits to use to avoid contention, and may be possible to expose this as something other than a percentage in the future. CC: Zeng Heng <redacted> Co-developed-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: James Morse <james.morse@arm.com>> Signed-off-by: Ben Horgan <ben.horgan@arm.com> --- Changes since v2: Code flow change Commit message 'or' Changes since v3: initialise tmp_cpumask update commit message check the traffic matches l3 update comment on candidate_class update, only mbm_total drop tags due to rework ---
quoted
+/* + * Test if the traffic for a class matches that at egress from the L3. For + * MSC at memory controllers this is only possible if there is a single L3 + * as otherwise the counters at the memory can include bandwidth from the + * non-local L3. + */ +static bool traffic_matches_l3(struct mpam_class *class) {An error reported by checkpatch.pl is as follows. ERROR: open brace '{' following function definitions go on the next line #826: FILE: drivers/resctrl/mpam_resctrl.c:826: +static bool traffic_matches_l3(struct mpam_class *class) {
Not sure how I let that slip through. Fixed now.
Best regards, Shaopeng TAN
Thanks, Ben