x86/resctrl: Allow arch to allocate memory needed in resctrl_arch_rmid_read()
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 --------------------------- Depending on the number of monitors available, Arm's MPAM may need to allocate a monitor prior to reading the counter value. Allocating a contended resource may involve sleeping. __check_limbo() and mon_event_count() each make multiple calls to resctrl_arch_rmid_read(), to avoid extra work on contended systems, the allocation should be valid for multiple invocations of resctrl_arch_rmid_read(). The memory or hardware allocated is not specific to a domain. Add arch hooks for this allocation, which need calling before resctrl_arch_rmid_read(). The allocated monitor is passed to resctrl_arch_rmid_read(), then freed again afterwards. The helper can be called on any CPU, and can sleep. Signed-off-by:James Morse <james.morse@arm.com> Tested-by:
Shaopeng Tan <tan.shaopeng@fujitsu.com> Tested-by:
Peter Newman <peternewman@google.com> Tested-by:
Babu Moger <babu.moger@amd.com> Reviewed-by:
Shaopeng Tan <tan.shaopeng@fujitsu.com> Reviewed-by:
Reinette Chatre <reinette.chatre@intel.com> Reviewed-by:
Babu Moger <babu.moger@amd.com> Signed-off-by:
Zeng Heng <zengheng4@huawei.com>
Loading
Please sign in to comment