RDTSET(8) | System Manager's Manual | RDTSET(8) |
NAME¶
rtdset - Task CPU affinity and Intel(R) Resource Director Technology control toolSYNOPSIS¶
rdtset <-t feature=value;...cpu=cpulist>... -c <cpulist> (-p <pid> | [-k] cmd [<args>...])rdtset -r <cpulist> <-t feature=value;...cpu=cpulist>... -c <cpulist> (-p <pid> | [-k] cmd [<args>...])
rdtset -r <cpulist> -c <cpulist> (-p <pid> | [-k] cmd [<args>...])
rdtset -r <cpulist> <-t feature=value;...cpu=cpulist>... -p <pid>
DESCRIPTION¶
For more details on Intel(R) Resource Director Technology seehttp://www.intel.com/content/www/us/en/architecture-and-technology/resource-director-technology.html
or https://github.com/01org/intel-cmt-cat/wiki
The rdtset tool provides support to set up the CAT (Cache Allocation Technology) capabilities for a task and set its CPU affinity. Current RDT/CAT operations of the utility are based on controlling MSR registers (via libpqos library). Class of service 0 (CLOS0) is assumed as default one. In command mode, rdtset forks and one process executes the command. Another process waits for the task to terminate and restores default CAT state by assigning cpu's back to CLOS0. This behavior is not in place in PID mode.
OPTIONS¶
rdtset options are as follow:- -h, --help
- Show help
- -v, --verbose
- Verbose mode
- -t , --rdt feature=value;...cpu=cpulist
- Specify RDT configuration, single class configuration per -t, multiple -t
options allowed.
Accepted values for features:
2, l2 for level 2 cache
3, l3 for level 3 cacheFor example:
-t 'l3=0xf;cpu=1'
CPU 1 uses four L3 cache-ways (mask 0xf)-t 'l3=0xf;cpu=2' -t 'l3=0xf0;cpu=3,4,5'
CPU 2 uses four L3 cache-ways (mask 0xf), CPUs 3-5 share four L3 cache-ways (mask 0xf0), L3 cache-ways used by CPU 2 and 3-4 are non-overlapping-t 'l3=0xf;cpu=0-2' -t 'l3=0xf0;cpu=3,4,5'
CPUs 0-2 share four L3 cache-ways (mask 0xf), CPUs 3-5 share four L3 cache-ways (mask 0xf0), L3 cache-ways used by CPUs 0-2 and 3-5 are non-overlapping-t 'l3=0xf,0xf0;cpu=1'
On CDP enabled system, CPU 1 uses four cache-ways for code (mask 0xf) and four cache-ways for data (mask 0xf0), data and code cache-ways are non-overlapping - -c <cpulist>, --cpu <cpulist>
- Specify CPU affinity configuration, a numerical list of processors. The numbers are separated by commas and may include ranges. For example: 1-3,4,5.
- -p <pid>, --pid <pid>
- Operate on existing, given pid
- -r <cpulist>, --reset <cpulist>
- Reset CAT for CPUs (assign COS#0 to listed CPUs)
For example:-r 0-5
Reset CAT configuration of CPUs 0-5-r 0-5 -t 'l3=0xf0;cpu=0-5' -c 0-5 -p $BASHPID
Reconfigure CAT for CPUs 0-5
In order to reconfigure CAT, it is needed to reset current CAT configuration - -k, --sudokeep
- Do not drop sudo elevated privileges
NOTES¶
CAT is configured using Model Specific Registers (MSRs) to set up the class of service masks and manage the association of the cores/logical threads to a class of service. The rdtset software executes in user space, and access to the MSRs is obtained through a standard Linux*/FreeBSD* interface. Under Linux, the virtual file system structure /dev/cpu/CPUNUM/msr provides an interface to read and write the MSRs, under FreeBSD it is /dev/cpuctlCPUNUM. The msr/cpuctl file interface is protected and requires root privileges. The msr/cpuctl driver might not be auto-loaded and on some modular kernels the driver may need to be loaded manually:Under Linux:
sudo modprobe msr
Under FreeBSD:
sudo kldload cpuctl
SEE ALSO¶
msr(4)AUTHOR¶
rdtset was written by Wojciech Andralojc <wojciechx.andralojc@intel.com>, Tomasz Kantecki <tomasz.kantecki@intel.com>This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
September 20, 2016 |