[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7050592d-6c2c-40ea-a3c5-3e7fcf76c3dc@intel.com>
Date: Mon, 21 Jul 2025 16:42:09 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Babu Moger <babu.moger@....com>, <corbet@....net>, <tony.luck@...el.com>,
<Dave.Martin@....com>, <james.morse@....com>, <tglx@...utronix.de>,
<mingo@...hat.com>, <bp@...en8.de>, <dave.hansen@...ux.intel.com>
CC: <x86@...nel.org>, <hpa@...or.com>, <akpm@...ux-foundation.org>,
<paulmck@...nel.org>, <rostedt@...dmis.org>, <Neeraj.Upadhyay@....com>,
<david@...hat.com>, <arnd@...db.de>, <fvdl@...gle.com>, <seanjc@...gle.com>,
<thomas.lendacky@....com>, <pawan.kumar.gupta@...ux.intel.com>,
<yosry.ahmed@...ux.dev>, <sohil.mehta@...el.com>, <xin@...or.com>,
<kai.huang@...el.com>, <xiaoyao.li@...el.com>, <peterz@...radead.org>,
<me@...aill.net>, <mario.limonciello@....com>, <xin3.li@...el.com>,
<ebiggers@...gle.com>, <ak@...ux.intel.com>, <chang.seok.bae@...el.com>,
<andrew.cooper3@...rix.com>, <perry.yuan@....com>,
<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v7 08/10] fs/resctrl: Introduce interface to display
io_alloc CBMs
Hi Babu,
On 7/10/25 10:16 AM, Babu Moger wrote:
> The io_alloc feature in resctrl enables system software to configure
> the portion of the cache allocated for I/O traffic.
>
> Add "io_alloc_cbm" resctrl file to display CBMs (Capacity Bit Mask) o
> fio_alloc feature.
"o fio_alloc" -> "of the io_alloc"
>
> The CBM interface file io_alloc_cbm will reside in the info directory
"will reside" -> "resides"
> (e.g., /sys/fs/resctrl/info/L3/). Displaying the resource name is not
> necessary. Pass the resource name to show_doms() and print it only if
> the name is valid. For io_alloc, pass NULL to suppress printing the
> resource name.
>
> When CDP is enabled, io_alloc routes traffic using the highest CLOSID
> associated with an L3CODE resource. However, CBMs can be accessed via
> either L3CODE or L3DATA resources.
Seems like something is missing here since this is motivation for a behavior
but no mention of the behavior being motivated. Also please use imperative tone.
>
> Signed-off-by: Babu Moger <babu.moger@....com>
> ---
...
> ---
> Documentation/filesystems/resctrl.rst | 18 +++++++++++
> fs/resctrl/ctrlmondata.c | 8 +++--
> fs/resctrl/internal.h | 2 ++
> fs/resctrl/rdtgroup.c | 43 ++++++++++++++++++++++++++-
> 4 files changed, 67 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/filesystems/resctrl.rst b/Documentation/filesystems/resctrl.rst
> index 189c1ccb92d6..c22a9dd667cd 100644
> --- a/Documentation/filesystems/resctrl.rst
> +++ b/Documentation/filesystems/resctrl.rst
> @@ -176,6 +176,24 @@ related to allocation:
> When CDP is enabled, io_alloc routes I/O traffic using the highest
> CLOSID allocated for the instruction cache (L3CODE).
>
> +"io_alloc_cbm":
> + CBMs(Capacity Bit Masks) that describe the portions of cache instances
> + to which I/O traffic from supported I/O devices are routed.
"are routed" -> "are routed when "io_alloc" is enabled"?
> +
> + CBMs are displayed in the following format:
> +
> + <cache_id0>=<cbm>;<cache_id1>=<cbm>;...
> +
> + Example::
> +
> + # cat /sys/fs/resctrl/info/L3/io_alloc_cbm
> + 0=ffff;1=ffff
> +
> + When CDP is enabled "io_alloc_cbm" associated with the DATA and CODE
> + resources may reflect the same values. For example, values read from and
> + written to /sys/fs/resctrl/info/L3DATA/io_alloc_cbm may be reflected by
> + /sys/fs/resctrl/info/L3CODE/io_alloc_cbm and vice versa.
> +
> Memory bandwidth(MB) subdirectory contains the following files
> with respect to allocation:
>
> diff --git a/fs/resctrl/ctrlmondata.c b/fs/resctrl/ctrlmondata.c
> index d98e0d2de09f..e78828b0408a 100644
> --- a/fs/resctrl/ctrlmondata.c
> +++ b/fs/resctrl/ctrlmondata.c
> @@ -381,7 +381,8 @@ ssize_t rdtgroup_schemata_write(struct kernfs_open_file *of,
> return ret ?: nbytes;
> }
>
> -static void show_doms(struct seq_file *s, struct resctrl_schema *schema, int closid)
> +void show_doms(struct seq_file *s, struct resctrl_schema *schema, char *resource_name,
show_doms() can remain static within ctrlmondata.c by moving resctrl_io_alloc_cbm_show()
to ctrlmondata.c
Reinette
Powered by blists - more mailing lists