Re: [PATCH v5 10/16] fs/resctrl: Add support for hidden resource group files

From: Babu Moger

Date: Thu Sep 17 2026 - 15:11:46 EST


Hi Reinette,


On 9/16/26 00:33, Reinette Chatre wrote:
Hi Babu,

On 8/26/26 12:32 PM, Babu Moger wrote:
@@ -2377,6 +2380,33 @@ static int rdtgroup_add_files(struct kernfs_node *kn, unsigned long fflags)
return ret;
}
+/*
+ * resctrl_hidden_files_set_visible() - Show or hide files marked hidden
+ * @kn: resource group kernfs_node
+ * @show: whether to show or hide
+ *
+ * Iterate res_common_files entries marked hidden and show or hide the
+ * corresponding file under @kn.

As a generic helper this is not appropriate since it just blindly makes *all*
hidden files belonging to a resource group visible or invisible. This pretends to
be a generic function but then assumes that only kernel mode related files
are ever created with the hidden flag set because as the kernel mode changes
all hidden files belonging to the named parent changes visibility.

Are you suggesting that I update the code comments to be more specific about the group, or are you suggesting that the code itself should be changed?

Thanks,
Babu