Skip to content

likwid features

Thomas Roehl edited this page Apr 25, 2016 · 1 revision

likwid-features: A tool list and modify the states of CPU features

Introduction

CPUs provide hardware features that perform their duty under the hood. The features are commonly prefetchers that load data in the caching hierarchy before it is needed by an application. Intel CPUs provide a register that allows to (de)activate these features during runtime. The likwid-features tool is a simple command line application to do that.

After the Intel Core2 architecture, Intel changed the register containing the feature flags. For a documentation what flags are supported on which processor refer to the Intel Software Developer's Manual Volume 3B, Table B.2 and https://software.intel.com/en-us/articles/disclosure-of-hw-prefetcher-control-on-some-intel-processors.

This tool does not support AMD processors.

Options

-h, --help		 Help message
-v, --version		 Version information
-a, --all		 List all available features
-l, --list		 List features and state for given CPUs
-c, --cpus <list>	 Perform operations on given CPUs
-e, --enable <list>	 List of features that should be enabled
-d, --disable <list>	 List of features that should be disabled

Currently modifiable features:
HW_PREFETCHER, CL_PREFETCHER, DCU_PREFETCHER, IP_PREFETCHER

Usage

You can get the help message with

$ likwid-features -h

All features that are present in the register are listed with

$ likwid-features -a

The modifiable features are marked with a "*".

To see which features are active on a CPU:

$ likwid-features -c 0,1,2,3 -l
Feature               CPU 0	CPU 1	CPU 2	CPU 3	
HW_PREFETCHER         on	on	on	on	
CL_PREFETCHER         on	on	on	on	
DCU_PREFETCHER        on	on	on	on	
IP_PREFETCHER         on	on	on	on	
FAST_STRINGS          on	on	on	on	
THERMAL_CONTROL       on	on	on	on	
PERF_MON              on	on	on	on	
FERR_MULTIPLEX        off	off	off	off	
BRANCH_TRACE_STORAGE  on	on	on	on	
XTPR_MESSAGE          off	off	off	off	
PEBS                  on	on	on	on	
SPEEDSTEP             on	on	on	on	
MONITOR               on	on	on	on	
SPEEDSTEP_LOCK        off	off	off	off	
CPUID_MAX_VAL         off	off	off	off	
XD_BIT                on	on	on	on	
DYN_ACCEL             off	off	off	off	
TURBO_MODE            on	on	on	on	
TM2                   off	off	off	off

This lists all features for the CPUs 0,1,2 and 3. You can also put a CPU selection string here as accepted by likwid-pin like S0:0-3.

In order to enable a modifiable CPU feature:

$ likwid-features -c 0,1,2,3 -e DCU_PREFETCHER
DCU_PREFETCHER:	enabled
Enabled DCU_PREFETCHER for CPU 0
DCU_PREFETCHER:	enabled
Enabled DCU_PREFETCHER for CPU 1
DCU_PREFETCHER:	enabled
Enabled DCU_PREFETCHER for CPU 2
DCU_PREFETCHER:	enabled
Enabled DCU_PREFETCHER for CPU 3

To deactivate a modifiable CPU feature:

$ likwid-features -c 0,1,2,3 -d CL_PREFETCHER
CL_PREFETCHER:	disabled
Disabled CL_PREFETCHER for CPU 0
CL_PREFETCHER:	disabled
Disabled CL_PREFETCHER for CPU 1
CL_PREFETCHER:	disabled
Disabled CL_PREFETCHER for CPU 2
CL_PREFETCHER:	disabled
Disabled CL_PREFETCHER for CPU 3
Clone this wiki locally