[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6a69ff53-5c3a-45d5-904e-dfd3f58b6472@intel.com>
Date: Fri, 25 Jul 2025 16:27:36 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Tony Luck <tony.luck@...el.com>, Fenghua Yu <fenghuay@...dia.com>, "Maciej
Wieczor-Retman" <maciej.wieczor-retman@...el.com>, Peter Newman
<peternewman@...gle.com>, James Morse <james.morse@....com>, Babu Moger
<babu.moger@....com>, Drew Fustini <dfustini@...libre.com>, Dave Martin
<Dave.Martin@....com>, Anil Keshavamurthy <anil.s.keshavamurthy@...el.com>,
Chen Yu <yu.c.chen@...el.com>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
<patches@...ts.linux.dev>
Subject: Re: [PATCH v7 12/31] fs/resctrl: Make event details accessible to
functions when reading events
Hi Tony,
On 7/11/25 4:53 PM, Tony Luck wrote:
> All details about a monitor event are kept in the mon_evt structure.
> Upper levels of code only provide the event id to lower levels.
<newline to separate context from problem>
> This will become a problem when new attributes are added to the
> mon_evt structure.
Please be specific what is meant with "This" (is it that all details are
kept in the mon_evt structure or that upper levels only provide event id?)
as well as what "a problem" refers to.
>
> Change the mon_data and rmid_read structures to hold a pointer
> to the mon_evt structure instead of just taking a copy of the
> event id.
>
> No functional change.
>
> Signed-off-by: Tony Luck <tony.luck@...el.com>
> ---
> fs/resctrl/internal.h | 10 +++++-----
> fs/resctrl/ctrlmondata.c | 16 ++++++++--------
> fs/resctrl/monitor.c | 17 +++++++++--------
> fs/resctrl/rdtgroup.c | 6 +++---
> 4 files changed, 25 insertions(+), 24 deletions(-)
>
> diff --git a/fs/resctrl/internal.h b/fs/resctrl/internal.h
> index e4f06f700063..ef3ec2a4860f 100644
> --- a/fs/resctrl/internal.h
> +++ b/fs/resctrl/internal.h
> @@ -76,7 +76,7 @@ extern struct mon_evt mon_event_all[QOS_NUM_EVENTS];
> * struct mon_data - Monitoring details for each event file.
> * @list: Member of the global @mon_data_kn_priv_list list.
> * @rid: Resource id associated with the event file.
> - * @evtid: Event id associated with the event file.
> + * @evt: Event structure associated with the event file.
> * @sum: Set for RDT_RESOURCE_L3 when event must be summed
> * across multiple domains.
> * @domid: When @sum is zero this is the domain to which
> @@ -90,7 +90,7 @@ extern struct mon_evt mon_event_all[QOS_NUM_EVENTS];
> struct mon_data {
> struct list_head list;
> enum resctrl_res_level rid;
> - enum resctrl_event_id evtid;
> + struct mon_evt *evt;
> int domid;
> bool sum;
> };
> @@ -103,7 +103,7 @@ struct mon_data {
> * @r: Resource describing the properties of the event being read.
> * @hdr: Header of domain that the counter should be read from. If NULL then sum all
> * domains in @r sharing L3 @ci.id
> - * @evtid: Which monitor event to read.
> + * @evt: Event associated with the event file.
There is not always an event file involved when struct rmid_read is used to
read a counter. I believe that the original description is sufficient.
> * @first: Initialize MBM counter when true.
> * @ci_id: Cacheinfo id for L3. Only set when @hdr is NULL. Used when summing domains.
> * @err: Error encountered when reading counter.
> @@ -117,7 +117,7 @@ struct rmid_read {
> struct rdtgroup *rgrp;
> struct rdt_resource *r;
> struct rdt_domain_hdr *hdr;
> - enum resctrl_event_id evtid;
> + struct mon_evt *evt;
> bool first;
> unsigned int ci_id;
> int err;
Reinette
Powered by blists - more mailing lists