Re: [PATCH v2 3/3] x86/resctrl: Add "*" shorthand to set minimum io_alloc CBM for all domains

Aaron Tomlin
2025-12-19T00:26:15Z

[-- Attachment #1: Type: text/plain, Size: 1733 bytes --]

On Thu, Dec 18, 2025 at 03:32:56PM -0600, Moger, Babu wrote:
> Can't we just simplify to this patch without adding new data structures?

Hi Babu,

Indeed, we certainly can.

> diff --git a/fs/resctrl/ctrlmondata.c b/fs/resctrl/ctrlmondata.c
> index f7608121f5e3..d113d8a3ee02 100644
> --- a/fs/resctrl/ctrlmondata.c
> +++ b/fs/resctrl/ctrlmondata.c
> @@ -874,6 +874,7 @@ static int resctrl_io_alloc_parse_line(char *line,
> struct rdt_resource *r,
> struct rdt_ctrl_domain *d;
> char *dom = NULL, *id;
> unsigned long dom_id;
> + bool update_all;
>
> next:
> if (!line || line[0] == '\0')
> @@ -881,14 +882,18 @@ static int resctrl_io_alloc_parse_line(char *line,
> struct rdt_resource *r,
>
> dom = strsep(&line, ";");
> id = strsep(&dom, "=");
> - if (!dom || kstrtoul(id, 10, &dom_id)) {
> + update_all = false;
> +
> + if (id && *id == '*') {
> + update_all = true;
> + } else if (!dom || kstrtoul(id, 10, &dom_id)) {
> rdt_last_cmd_puts("Missing '=' or non-numeric domain\n");
> return -EINVAL;
> }
>
> dom = strim(dom);
> list_for_each_entry(d, &r->ctrl_domains, hdr.list) {
> - if (d->hdr.id == dom_id) {
> + if (update_all || (d->hdr.id == dom_id)) {
> data.buf = dom;
> data.mode = RDT_MODE_SHAREABLE;
> data.closid = closid;

The above is suitable. I will prepare a follow-up series once our wider
discussion has concluded and we have reached a consensus on the
architectural direction.

Kind regards,
--
Aaron Tomlin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]