If a cache partitioning scheme includes any dedicated CPU Classes of Service (CLOSes) for real-time workloads, you need to take additional steps to enable your workload to use that cache. These steps apply to partitioning presets and custom partitioning schemes.
By default, all cores initialize to CLOS 0. If a different CLOS is intended for a real-time workload, you need to associate that CLOS with the core that will run the real-time workload. Otherwise, your workload will not be able to use that CLOS.
After applying the new partitioning scheme and rebooting into it, associate the CLOS to the core as follows:
Decide which core will run the real-time workload.
Note the CLOS that is dedicated to real-time workloads.
If you are using a preset:
Presets that contain dedicated cache for one real-time workload: CLOS 1
Presets that contain dedicated cache for two real-time workloads independently: CLOS 1 and CLOS 2
To change the CLOS associated with a core, write the IA32_PQR_ASSOC model-specific register (MSR) with the desired CLOS. Utilities to assist with reading and writing MSRs vary by operating system. Download and copy msr-tools rdmsr/wrmsr binaries onto the target system. Msr-tools can be obtained from: https://github.com/intel/msr-tools
. On Linux, use the
utility and specify the core to run on.
For example, if the real-time workload will run on Core 2, and CLOS 1 is dedicated to real-time workloads, run the following command:
wrmsr -p 2 0xC8F 0x100000000
The example command runs on Core 2 (-p 2), writes IA32_PQR_ASSOC (0xC8F), and assigns CLOS 1 (0x100000000) to that core. After this point, Core 2 will use CLOS 1.