Re: [PATCH v23 06/19] x86/resctrl: Introduce snc_nodes_per_l3_cache
From: Peter Newman
Date: Fri Jul 26 2024 - 15:13:23 EST
Hi Tony,
On Fri, Jun 28, 2024 at 2:56 PM Tony Luck <tony.luck@xxxxxxxxx> wrote:
> @@ -1022,8 +1066,8 @@ int __init rdt_get_mon_l3_config(struct rdt_resource *r)
> int ret;
>
> resctrl_rmid_realloc_limit = boot_cpu_data.x86_cache_size * 1024;
> - hw_res->mon_scale = boot_cpu_data.x86_cache_occ_scale;
> - r->num_rmid = boot_cpu_data.x86_cache_max_rmid + 1;
> + hw_res->mon_scale = boot_cpu_data.x86_cache_occ_scale / snc_nodes_per_l3_cache;
> + r->num_rmid = (boot_cpu_data.x86_cache_max_rmid + 1) / snc_nodes_per_l3_cache;
I noticed that resctrl_arch_system_num_rmid_idx() still returns a
value based on the original, undivided x86_cache_max_rmid. In my local
testing, this resulted in the alloc_rmid() returning values too large
for the arch_mbm_-arrays.
Please take a look at the patch I shared[1] to try to address this.
Thanks!
-Peter
[1] https://lore.kernel.org/lkml/20240722204611.3549213-1-peternewman@xxxxxxxxxx/