Hi, Babu, > >> When a user creates a control or monitor group, the CLOSID or RMID > >> are not visible to the user. These are architecturally defined entities. > >> There is no harm in displaying these in resctrl groups. Sometimes it > >> can help to debug the issues. > > Although "no harm" to show them, it's not useful for generic user > > either and may cause confusion sometimes. CLOSID and RMID are supposed > > to be invisible to generic users. > > > > Maybe introduce a new resctrl mount option called "debug" and show the > > files and maybe other future debug info only in debug mode? > > Actually, test team feels very strongly about this. Whenever there is some issue, > first question is what is the rmid or closid are you running on? We normally don't > have an answer for that. > > In my opinion, adding debug mode just for these two fields seems way overkill. Yes, they are useful for "test team" (quoted from your statement) and developers. Not for end users. A debug mode is useful not just for these two files. I'm working on another resctrl project where much more complex hardware info needs to be dumped for debug purpose only. It's obvious not to show it in generic use. It's more obvious to just show the info file in debug mode in my case. I think these CLOSID and RMID files and future debug files belong to a new debug mode. It would be better to introduce the debug mode now rather than later so that it can be extended easily in the future. Maybe we can enable debug mode in a separate debug mode patch: 1. Add RFTYPE_DEBUG as a new file type. Files with this flag are for debug purpose and only be visible in\ debug mode. 2. Add RFTYPE_INVISIBLE as a new file type. Files with this flag will be invisible/not be added in resctrl fs. 3. Add mount parameter "debug" so that ctx->debug=true if mount -o debug is given. 4. If ctx->debug is true, in rdt_enable_ctx(), go through RFTYPE_DEBUG files in res_common_files[] and mark fflags with RFTYPE_INVISIBLE. 5. In rdtgroup_add_file(), if (rft->fflags & RFTYPE_INVISIBLE) return. So the debug files will be visible only in debug mode. With the debug mode patch in place, it's simple to extend to any debug files: In your case, update this patch by just adding RFTYPE_DEBUG in fflags. Then the debug mode will work for this patch automatically. In my case or any future debug files, we just simply add RFTYPE_DEBUG in fflags and the debug mode will work automatically. Does it make sense? Thanks. -Fenghua