Hi Reinette, On 7/21/25 18:42, Reinette Chatre wrote: > 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" > Sure. >> >> The CBM interface file io_alloc_cbm will reside in the info directory > > "will reside" -> "resides" > Sure. >> (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. Sure. Added motivation for this. > >> >> Signed-off-by: Babu Moger <babu.moger@xxxxxxx> >> --- > > ... > >> --- >> 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"? > Sure. >> + >> + 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 > Yes. Moved it to ctrlmondata.c. Thanks Babu Moger