Hi Babu, On 8/6/25 2:12 PM, Moger, Babu wrote: > On 7/25/25 13:29, Babu Moger wrote: >> diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c >> index c7ca9113a12a..acbda73a9b9d 100644 >> --- a/fs/resctrl/rdtgroup.c >> +++ b/fs/resctrl/rdtgroup.c >> @@ -1829,6 +1829,30 @@ static int resctrl_mbm_assign_mode_show(struct kernfs_open_file *of, >> return 0; >> } >> >> +static int resctrl_num_mbm_cntrs_show(struct kernfs_open_file *of, >> + struct seq_file *s, void *v) >> +{ >> + struct rdt_resource *r = rdt_kn_parent_priv(of->kn); >> + struct rdt_mon_domain *dom; >> + bool sep = false; >> + >> + cpus_read_lock(); >> + mutex_lock(&rdtgroup_mutex); >> + >> + list_for_each_entry(dom, &r->mon_domains, hdr.list) { >> + if (sep) >> + seq_putc(s, ';'); >> + >> + seq_printf(s, "%d=%d", dom->hdr.id, r->mon.num_mbm_cntrs); >> + sep = true; >> + } >> + seq_putc(s, '\n'); >> + >> + mutex_unlock(&rdtgroup_mutex); >> + cpus_read_unlock(); >> + return 0; >> +} > > How about moving this also to monitor.c? Yes, this sounds good to me. This is what I had in mind when suggesting in [1] that the monitoring related handlers should be located in monitor.c Reinette [1] https://lore.kernel.org/lkml/0fa9a12b-e900-4ceb-b59c-e653ec3db0ca@xxxxxxxxx/