Re: [PATCH v6 10/18] fs/resctrl: Add support for hidden resource group files
From: Reinette Chatre
Date: Tue Oct 20 2026 - 18:01:20 EST
Hi Babu,
On 10/20/26 12:10 PM, Babu Moger wrote:
> On 10/19/26 11:22, Reinette Chatre wrote:
>> On 10/16/26 1:53 PM, Moger, Babu wrote:
>>> On 10/15/2026 10:27 AM, Reinette Chatre wrote:
>>>> On 10/1/26 8:10 AM, Babu Moger wrote:
>>>>> Some per-group resctrl files are only meaningful once a resource group
>>>>> has an active kernel mode association.
>>>>
>>>> Could this elaborate more about how the files depend on the kernel mode
>>>> and why they may not always be meaningful?
>>>>
>>>>>
>>>>> Creating them only at activation would complicate group setup and
>>>>
>>>> Why would it complicate group setup and teardown? I think it would
>>>> rather complicate mode activation and de-activation but since there is
>>>> no detail about how this will complicate group setup it is difficult to
>>>> compare. It is difficult to reason about a patch when the motivation is
>>>> vague.
>>>>
>>>>> teardown, while exposing them on every group would show empty files
>>>>
>>>> "show empty files" - technically these files, as they are implemented,
>>>> will not be empty but return errors
>>>>
>>>>> with no clear purpose.
>>>>>
>>>>> Add a hidden property to struct rftype to hide files at creation.
>>>>
>>>> Missing a "why".
>>>> This can append to describe how this adds the foundational support in
>>>> preparation for features to restore visibility when the feature's files
>>>> need to be exposed to user space.
>>>>
>>>
>>> Will rephrase the whole changelog:
>>>
>>> "Some per-group resctrl files are only applicable to resource groups
>>> with an active kernel mode association. Accessing these files before a
>>> kernel mode association is established would result in errors and does
>>> not provide useful information.
>>
>> What does "and does not provide useful information" refer to? Does this
>> mean that the errors are not useful?
>
> Hmm.. One more attempt:
>
> "Some per-group resctrl files are only applicable when a resource group has an active kernel mode association. Exposing these files before the mode is activated is not useful because they have no meaningful information to provide, while reporting errors on access offers little value. Dynamically creating and removing the files as associations are activated and deactivated would add complexity to the mode management path.
>
> Add a hidden property to struct rftype so the files can be created with the resource group and exposed only when applicable.
>
> This provides the infrastructure needed to control file visibility for future kernel-mode-specific resctrl interfaces."
>
I still find this motivation vague as it seems to aim to be generic when it requires to
be specific since it is needed by the global per-CPU kernel mode support. Consider,
for example, in comparison a changelog below that is specific to the problem that needs to
be solved and why. Again this is an example that does not take into account the consistent
terms that you aim to use in next version:
fs/resctrl: Add support for hidden resource group files
A resctrl file is visible to user space as soon as its resource group
directory is activated. A file can only be hidden after it has been created,
as is done for the info directory's BMEC event configuration files.
In the global_enable_per_cpu kernel mode, kernel work running on CPUs where
the mode is active is allocated resources and/or monitored as part of a single
backing resource group. The files needed to display and modify the CPUs on
which this kernel mode is active are only meaningful in that group. Visible in
every resource group, the files would return errors when accessed in any group
other than the one backing the active kernel mode. Creating the files when the
kernel mode is activated, and removing them when it is deactivated, would add
failure paths to kernel mode activation that showing and hiding existing files
does not have.
Allow a resource group file to be marked as hidden so that it is hidden when
created, before its directory is activated, and is never visible to user space
until resctrl restores its visibility. This provides the foundation in
preparation for kernel mode support that shows the kmode_cpus and
kmode_cpus_list files only in the resource group backing the active kernel
mode.
Reinette