Re: [PATCH v1 9/9] x86/resctrl: Add mount option to enable soft RMID

Reinette Chatre
2023-05-11T21:41:41Z

Hi Peter,

On 4/21/2023 7:17 AM, Peter Newman wrote:
> Add the 'mbm_soft_rmid' mount option to enable soft RMIDs.
>
> This requires adding a mechanism for disabling a monitoring event at
> mount time to prevent the llc_occupancy event from being presented to
> the user.
>
> Signed-off-by: Peter Newman <peternewman@google.com>
> ---
> arch/x86/kernel/cpu/resctrl/internal.h | 3 ++
> arch/x86/kernel/cpu/resctrl/rdtgroup.c | 51 ++++++++++++++++++++++++++
> 2 files changed, 54 insertions(+)
>
> diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h
> index e6ff31a4dbc4..604e3d550601 100644
> --- a/arch/x86/kernel/cpu/resctrl/internal.h
> +++ b/arch/x86/kernel/cpu/resctrl/internal.h
> @@ -59,6 +59,7 @@ struct rdt_fs_context {
> bool enable_cdpl2;
> bool enable_cdpl3;
> bool enable_mba_mbps;
> + bool enable_mbm_soft_rmid;
> };
>
> static inline struct rdt_fs_context *rdt_fc2context(struct fs_context *fc)
> @@ -76,12 +77,14 @@ DECLARE_STATIC_KEY_FALSE(rdt_mon_enable_key);
> * @evtid: event id
> * @name: name of the event
> * @configurable: true if the event is configurable
> + * @enabled: true if event is disabled
> * @list: entry in &rdt_resource->evt_list
> */
> struct mon_evt {
> enum resctrl_event_id evtid;
> char *name;
> bool configurable;
> + bool disabled;
> struct list_head list;
> };

Note the description of member named "enabled" of member
named "disabled".

Reinette