+0
−15
+1
−46
+17
−0
Loading
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8T2RT -------------------------------- When attempting to enable the MPAM memory bandwidth monitoring feature, we found that MPAM differs from x86 RDT in hardware topology implementation. To maintain compatibility with the interface of version, a small amount of public code needs to be split. According to the x86 SDM, both total memory bandwidth and local memory bandwidth are classified as part of L3 cache monitoring: ~~~ mon_data ├── mon_L3_00 │ ├── llc_occupancy │ ├── mbm_local_bytes │ └── mbm_total_bytes └── mon_L3_01 ├── llc_occupancy ├── mbm_local_bytes └── mbm_total_bytes ~~~ In contrast, for ARM64 MPAM, L3/memory monitoring is implemented using separate L3/MATA resources: ~~~ mon_data ├── mon_L3_01 │ ├── llc_occupancy │ └── mbm_local_bytes ├── mon_L3_195 │ ├── llc_occupancy │ └── mbm_local_bytes ├── mon_MB_00 │ └── mbm_total_bytes └── mon_MB_01 └── mbm_total_bytes ~~~ The public code file fs/resctrl/monitor.c has added a reference to resctrl_arch_mon_resource_init() and removed l3_mon_evt_init(). Both x86 RDT and ARM64 MPAM implement their own versions of resctrl_arch_mon_resource_init() and l3_mon_evt_init(), with the x86 part retaining its original logic unchanged. Fixes: 13e249bf ("x86/resctrl: Move the filesystem portions of resctrl to live in '/fs/'") Signed-off-by:Zeng Heng <zengheng4@huawei.com>