Skip to content
Andi Kleen edited this page Oct 11, 2020 · 5 revisions

toplev tunables

toplev has some internal tunables to tune the group scheduler. These can be overridden with the (undocumented) --tune option.

Normal operation should not need to change any of this, but it can be useful to get different grouping for special purposes.

--tune 'any_merge = False'

Disable merging of unrelated groups. In theory it's better to have smaller groups that could run in parallel with other users to increase the time share of specific groups. However the Linux perf scheduler isn't very good at dynamically figuring out those cases, so larger groups give it less trouble.

--tune 'run_l1_parallel = True'

One Icelake+ with the fixed counter metrics avoid any conflicts between the fixed metrics group and other groups. This requires using an extra generic counter to get 'slots' in the other groups. In theory this should allow running the fixed metrics group in parallel with everything else, but right now the perf scheduler doesn't do this unfortunately.

Environment variables to override (mainly for testing):

FORCECPU=cpu

Force CPU type (e.g. skl). Also --force-cpu

FORCECOUNTERS=n

Force number of generic counters

FORCEHT=0/1

Force SMT mode

HYPERVISOR=0/1

Force hypervisor mode (also --force-hypervisor)

CPUINFO=file

Read cpu information from file instead of /proc/cpuinfo. Also --force-cpuinfo

TOPOLOGY=file

Read sysfs topology from file. Also --force-topology

PERF=exe

Force perf binary to run

FORCE_NMI_WATCHDOG=1

Force NMI watchdog mode

KERNEL_VERSION=...

Force kernel version (e.g. 5.0)

FORCEMETRICS=1

Force fixed metrics and slots