Commit 3df1d1b7 authored by Zeng Heng's avatar Zeng Heng
Browse files

arm64/mpam: Support MATA monitor feature for MPAM

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8T2RT



--------------------------------

To support the MB monitoring feature, provide mbm_total_bytes interface
under the resctrl fs to monitor the MATA memory bandwidth.

To accommodate platforms where the number of MATA monitor resources is less
than the number of closids, which prevents support for MB(Memory Bandwidth)
monitoring features, we have removed this constraint.

This allows bandwidth monitoring to operate in non-free running mode.

Fixes: dc2005d4 ("untested: arm_mpam: resctrl: Add support for mbm counters")
Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
parent 9d672495
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -473,14 +473,6 @@ static bool class_has_usable_mbwu(struct mpam_class *class)
	if (!mpam_has_feature(mpam_feat_msmon_mbwu, cprops))
		return false;

	/*
	 * resctrl expects the bandwidth counters to be free running,
	 * which means we need as many monitors as resctrl has
	 * control/monitor groups.
	 */
	if (cprops->num_mbwu_mon < resctrl_arch_system_num_rmid_idx())
		return false;

	return (mpam_partid_max > 1) || (mpam_pmg_max != 0);
}