Re: [PATCH v7 09/19] fs/resctrl: Rearrange top-level files in info directory

From: Moger, Babu

Date: Fri Dec 04 2026 - 17:10:41 EST


Hi Reinette,

On 12/1/2026 10:54 PM, Reinette Chatre wrote:
Hi Babu,

On 11/11/26 2:44 PM, Babu Moger wrote:
The "last_cmd_status" file reports the status of the last command
executed by the resctrl subsystem. Since it is documented after all
other files in the info directory, it is easy to overlook.

No. This just makes up this strange reason to justify a change that
is actually needed by this series. The _actual_ reason is that the
documentation contains "Finally, in the top level of the "info" directory
there is a file named "last_cmd_status"", so it's written as if that is the
last and only top-level file. Since this series introduces more top-level
info files the existing structure needs to change to support that.

Ack.


Create a dedicated section for top-level files in the info directory
and move the "last_cmd_status" documentation there.

Needs motivation _why_ this change is needed.

Consider:
The resctrl documentation describes the "info" directory's files
directory by directory and closes with "Finally, in the top level of the
"info" directory there is a file named "last_cmd_status"." The text
assumes that "last_cmd_status" is the only file in the top level of the
"info" directory, leaving no place to document another one.

Add a section for the files in the top level of the "info" directory, in
preparation for documenting additional top-level files.


Looks good. Thanks


Suggested-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
Signed-off-by: Babu Moger <babu.moger@xxxxxxx>
---
v7: New patch to move the last_cmd_status in new section.
---
Documentation/filesystems/resctrl.rst | 29 +++++++++++++++++----------
1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/Documentation/filesystems/resctrl.rst b/Documentation/filesystems/resctrl.rst
index d13a4998ee7e..2d672bbb69be 100644
--- a/Documentation/filesystems/resctrl.rst
+++ b/Documentation/filesystems/resctrl.rst
@@ -529,18 +529,25 @@ with the following files:
The upper bound for how many "CTRL_MON" + "MON" can be created
is the smaller of the L3_MON and PERF_PKG_MON "num_rmids" values.
-Finally, in the top level of the "info" directory there is a file
-named "last_cmd_status". This is reset with every "command" issued
-via the file system (making new directories or writing to any of the
-control files). If the command was successful, it will read as "ok".
-If the command failed, it will provide more information that can be
-conveyed in the error returns from file operations. E.g.

Reading this I believe the original text has a typo:
"more information that can be conveyed" -> "more information than can be conveyed"

This patch just copies it as-is but this seems like a good time to fix this.
If you agree, could you please add the fix as well as a mention in the
changelog ("Fix the description to say that the file provides more
information "than" can be conveyed in the error returns.")


Agree. Will do.
Thanks
Babu