x86/resctrl: Add helper for setting CPU default properties
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 --------------------------- rdtgroup_rmdir_ctrl() and rdtgroup_rmdir_mon() set the per-cpu pqr_state for CPUs that were part of the rmdir'd group. Another architecture might not have a 'pqr_state', its hardware may need the values in a different format. MPAM's equivalent of RMID values are not unique, and always need the CLOSID to be provided too. As only rdtgroup_rmdir_mon() modifies just the RMID, provide a helper that sets both values. This allows another architecture to convert the values into the format the hardware expects. As these values are read by __resctrl_sched_in(), but may be written by a different CPU without any locking, add READ/WRTE_ONCE() to avoid torn values. Signed-off-by:James Morse <james.morse@arm.com> Signed-off-by:
Zeng Heng <zengheng4@huawei.com>
Loading
Please sign in to comment