Messages in this thread | | | Date | Tue, 12 Mar 2024 15:06:32 -0500 | From | "Moger, Babu" <> | Subject | Re: [PATCH v5 1/2] x86/resctrl: Pass domain to target CPU |
| |
On 3/8/24 15:38, Tony Luck wrote: > reset_all_ctrls() and resctrl_arch_update_domains() use on_each_cpu_mask() > to call rdt_ctrl_update() on potentially one CPU from each domain. > > But this means rdt_ctrl_update() needs to figure out which domain to > apply changes to. Doing so requires a search of all domains in a resource, > which can only be done safely if cpus_lock is held. Both callers do hold > this lock, but there isn't a way for a function called on another CPU > via IPI to verify this. > > Commit c0d848fcb09d ("x86/resctrl: Remove lockdep annotation that triggers > false positive") removed the incorrect assertions. > > Add the target domain to the msr_param structure and > call rdt_ctrl_update() for each domain separately using > smp_call_function_single(). This means that rdt_ctrl_update() doesn't > need to search for the domain and get_domain_from_cpu() can safely assert > that the cpus_lock is held since the remaining callers do not use IPI. > > Signed-off-by: Tony Luck <tony.luck@intel.com> > Tested-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com> > Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> > Reviewed-by: James Morse <james.morse@arm.com>
Reviewed-by: Babu Moger <babu.moger@amd.com>
| |