Commit 9119da14 authored by James Morse's avatar James Morse Committed by Zeng Heng
Browse files

arm_mpam: resctrl: Allow resctrl to allocate monitors

maillist inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8T2RT

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/log/?h=mpam/snapshot/v6.7-rc2



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

When resctrl wants to read a domain's 'QOS_L3_OCCUP', it needs
to allocate a monitor on the corresponding resource. Monitors are
allocated by class instead of component.

Add helpers to do this.

The MBM events depend on having their monitors allocated at init
time so that they can be left running. The value USE_RMID_IDX
is out of range for a monitor, and is used to indicate this
behaviour.

resctrl_arch_mon_ctx_alloc() is implemented to have a no_wait
version and a waitqueue for callers that sleep. The no_wait
version will later become an interface for the resctrl_pmu
to use.

Signed-off-by: default avatarJames Morse <james.morse@arm.com>
Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
parent dc2005d4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment