[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <35929970-84d0-430b-8952-377dae6edd9b@amd.com>
Date: Fri, 5 Dec 2025 13:35:37 -0600
From: "Moger, Babu" <bmoger@....com>
To: Aaron Tomlin <atomlin@...mlin.com>, tony.luck@...el.com,
reinette.chatre@...el.com, Dave.Martin@....com, james.morse@....com,
babu.moger@....com, tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com
Cc: sean@...e.io, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] fs/resctrl: Add helpers to check io_alloc support and
enabled state
Hi Aaron,
On 11/26/2025 11:16 AM, Aaron Tomlin wrote:
> This patch introduces two helpers to validate io_alloc support and
> whether it is enabled. This reduces code duplication, clarifies
> intent, and preserves existing semantics and messages.
>
> Signed-off-by: Aaron Tomlin <atomlin@...mlin.com>
> ---
> fs/resctrl/ctrlmondata.c | 74 +++++++++++++++++++++++++++++-----------
> 1 file changed, 54 insertions(+), 20 deletions(-)
>
> diff --git a/fs/resctrl/ctrlmondata.c b/fs/resctrl/ctrlmondata.c
> index b2d178d3556e..5f6f96d70e4a 100644
> --- a/fs/resctrl/ctrlmondata.c
> +++ b/fs/resctrl/ctrlmondata.c
> @@ -758,6 +758,50 @@ u32 resctrl_io_alloc_closid(struct rdt_resource *r)
> return resctrl_arch_get_num_closid(r) - 1;
> }
>
> +/*
> + * check_io_alloc_support() - Establish if io_alloc is supported
> + *
> + * @s: resctrl resource schema.
> + *
> + * This function must be called under the cpu hotplug lock
> + * and rdtgroup mutex
> + *
> + * Return: 0 on success, negative error code otherwise.
> + */
> +static int check_io_alloc_support(struct resctrl_schema *s)
For consistency, how about changing the name to
resctrl_io_alloc_supported() and
resctrl_io_alloc_enabled()
Thanks
Babu
Powered by blists - more mailing lists