Re: [PATCH v1 02/20] x86/resctrl: Merge mon_capable and mon_enabled

From: Jamie Iles
Date: Wed Aug 11 2021 - 08:16:20 EST


Hi James,

On Thu, Jul 29, 2021 at 10:35:52PM +0000, James Morse wrote:
> mon_enabled and mon_capable are always set as a pair by
> rdt_get_mon_l3_config().
>
> There is no point having two values.
>
> Merge them together.
>
> Signed-off-by: James Morse <james.morse@xxxxxxx>
> ---
> arch/x86/kernel/cpu/resctrl/internal.h | 4 ----
> arch/x86/kernel/cpu/resctrl/monitor.c | 1 -
> arch/x86/kernel/cpu/resctrl/rdtgroup.c | 8 ++++----
> include/linux/resctrl.h | 4 ++--
> 4 files changed, 6 insertions(+), 11 deletions(-)
>
...
> diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
> index ada0a02093a6..d715df9de37f 100644
> --- a/include/linux/resctrl.h
> +++ b/include/linux/resctrl.h
> @@ -130,7 +130,7 @@ struct resctrl_schema;
> /**
> * struct rdt_resource - attributes of a resctrl resource
> * @rid: The index of the resource
> - * @mon_enabled: Is monitoring enabled for this feature
> + * @cdp_enabled Is CDP enabled for this resource
> * @alloc_capable: Is allocation available on this machine
> * @mon_capable: Is monitor feature available on this machine
> * @num_rmid: Number of RMIDs available
> @@ -149,7 +149,7 @@ struct resctrl_schema;
> */
> struct rdt_resource {
> int rid;
> - bool mon_enabled;
> + bool cdp_enabled;

Nothing is setting cdp_enabled in this patch, is this intended to be
here?

Thanks,

Jamie