Re: [PATCH v13 11/32] x86,fs/resctrl: Handle events that can be read from any CPU

Reinette Chatre
2025-11-13T04:02:29Z

Hi Tony,

On 10/29/25 9:20 AM, Tony Luck wrote:
> resctrl assumes that monitor events can only be read from a CPU in the
> cpumask_t set of each domain. This is true for x86 events accessed
> with an MSR interface, but may not be true for other access methods such
> as MMIO.
>
> Introduce and use flag mon_evt::any_cpu, settable by architecture, that
> indicates there are no restrictions on which CPU can read that event.
>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---

This implies a generic change while __l3_mon_event_count() cannot support it.
While I understand why cpu_on_correct_domain() was removed, the existing checking
requires DEBUG_PREEMPT to be set so I think it would be helpful if there is something
like a WARN_ON_ONCE(rr->evt->any_cpu) before calling __l3_mon_event_count() to help
catch issues.

Reinette