Re: [PATCH v6 14/18] fs/resctrl: Control visibility of global per-CPU kernel mode group files

From: Reinette Chatre

Date: Mon Oct 19 2026 - 18:00:44 EST


Hi Babu,

On 10/19/26 9:31 AM, Babu Moger wrote:
> Hi Reinette,
>
> On 10/15/26 10:46, Reinette Chatre wrote:
>> Hi Babu,
>>
>> On 10/1/26 8:10 AM, Babu Moger wrote:
>>> The kmode_cpus and kmode_cpus_list files are specific to the
>>> RESCTRL_GLOBAL_ENABLE_PER_CPU kernel mode. These files are created in a
>>> hidden state when an rdtgroup is created.
>>>
>>> Introduce resctrl_kmode_global_files_show() to manage the visibility of
>>> these files based on whether the global per-CPU kernel mode is enabled or
>>> disabled.
>>
>> This does not sound right and does not match the patch. The visibility of files
>> is per group, not globally whether the mode is enabled or not, right?
>>
>> It is ok to have cryptic changelogs when changes are small and simple but these
>> changes are not small and simple.
>
> "The kmode_cpus and kmode_cpus_list files are specific to the RESCTRL_GLOBAL_ENABLE_PER_CPU kernel mode. These files are created in a hidden state when an rdtgroup is created.

Could the context please help the reader a bit more? Some items that could help:
- *why* are these files specific to global per-CPU kernel mode? (mention that it is used by user space
to do the per-CPU enable/disable of the mode)
- *why* is it created in a hidden state? (mention that a resource group can only be assigned
to the global per-CPU kernel mode after it has been created via a separate resctrl file)

> > Introduce resctrl_kmode_global_files_show() to manage the visibility
> of these files based on whether a resource group backs the global

hmmm ... resctrl_kmode_global_files_show() does not actually do any
checks to ensure the resource group backs the global per-CPU kernel mode.


> per-CPU kernel mode. Hide the files when the group is no longer
> associated with the mode.
Could the patches be organized so that this becomes a symmetrical change
that highlights when files become visible and when they become invisible to support
the description within this changelog?

>
> This avoids exposing kernel mode configuration files in resource groups where they do not apply."
>

Reinette