Re: [PATCH v5 16/16] fs/resctrl: Add documentation on kernel_mode with example

From: Moger, Babu

Date: Tue Sep 01 2026 - 19:31:14 EST


Hi Tony,

On 9/1/2026 4:14 PM, Luck, Tony wrote:
On Wed, Aug 26, 2026 at 02:32:30PM -0500, Babu Moger wrote:

I fake enabled PLZA on my test system, replacing the wrmsrq()
with some console logging. Tried out several of the examples
in the documentation and the ones I tried all worked.

Thank you. Appreciated.


+c. Narrow the association to CPUs 0-3
+::
+
+ # echo 0-3 > /sys/fs/resctrl/ctrl1/kmode_cpus_list
+ # cat /sys/fs/resctrl/ctrl1/kmode_cpus
+ f
+ # cat /sys/fs/resctrl/ctrl1/kmode_cpus_list
+ 0-3
+
+The write reprograms the association:
+
+- CPUs added to the mask are enabled.
+- CPUs removed from the mask are disabled.

More precise to say:

PLZA is enabled on CPUs added to the mask.
PLZA is disabled on CPUs removed from the mask.

Or perhaps
PLZA reverts to "inherit_user" mode on CPUs removed from the mask.

+- Offline CPUs in the mask are rejected.
+- An empty mask disables the association on all currently online CPUs, but
+ later hotplug CPUs are still associated automatically.

Is there a use case for only enabling PLZA on some subset of CPUs?

Probably not. The current use case we know of is enabled either on all CPUs or on none of them. However, I think it's best to keep the option open.


The special case for:

# echo "" > ctrl1/kmode_cpus

seems particularly strange. It reads to me as:

"I want this PLZA feature enabled, but don't use it on any CPUs".


Yeah, that's true. However, it is consistent with our current cpus and cpus_list interface

Thanks
Babu