Re: [PATCH v18 09/17] x86/resctrl: Add new fields to struct rmid_read for summation of domains

Reinette Chatre
2024-05-22T21:14:58Z

Hi Tony,

On 5/15/2024 3:23 PM, Tony Luck wrote:
> rdtgroup_mondata_show() calls mon_event_count() which packages up all

mon_event_count() -> mon_event_read()?

> the required details into an rmid_read structure passed across the
> smp_call*() infrastructure.
>
> Legacy files reporting for a single domain pass that domain in the
> rmid_read structure. Files that need to sum multiple domains have
> meta data that provides the display_id for domains that must be
> summed.

( ... and also for convenience pass a domain in the rmid_read structure
... more later)

>
> Add the sumdomains and display_id fields to the rmid_read structure.
>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---
> arch/x86/kernel/cpu/resctrl/internal.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h
> index 49440f194253..498c5d240c68 100644
> --- a/arch/x86/kernel/cpu/resctrl/internal.h
> +++ b/arch/x86/kernel/cpu/resctrl/internal.h
> @@ -150,6 +150,8 @@ struct rmid_read {
> struct rdt_mon_domain *d;
> enum resctrl_event_id evtid;
> bool first;
> + bool sumdomains;
> + int display_id;
> int err;
> u64 val;
> void *arch_mon_ctx;

These new members have enough obscurity to make this a good
point to document the members of struct rmid_read

Reinette