51 lines
1.8 KiB
Text
51 lines
1.8 KiB
Text
# tuned configuration
|
|
#
|
|
|
|
[main]
|
|
summary=Optimize for CPU partitioning
|
|
include=network-latency
|
|
|
|
[variables]
|
|
# User is responsible for updating variables.conf with variable content such as isolated_cores=X-Y
|
|
include=/etc/tuned/cpu-partitioning-variables.conf
|
|
|
|
# Fail if isolated_cores are not set
|
|
assert1=${f:assertion_non_equal:isolated_cores are not set:${isolated_cores}:\\${isolated_cores}}
|
|
|
|
# tmpdir
|
|
tmpdir=${f:exec:/usr/bin/mktemp:-d}
|
|
# Non-isolated cores cpumask including offline cores
|
|
isolated_cores_expanded=${f:cpulist_unpack:${isolated_cores}}
|
|
isolated_cpumask=${f:cpulist2hex:${isolated_cores_expanded}}
|
|
not_isolated_cores_expanded=${f:cpulist_invert:${isolated_cores_expanded}}
|
|
isolated_cores_present_expanded=${f:cpulist_present:${isolated_cores}}
|
|
not_isolated_cores_present_expanded=${f:cpulist_present:${not_isolated_cores_expanded}}
|
|
not_isolated_cpumask=${f:cpulist2hex:${not_isolated_cores_expanded}}
|
|
|
|
# Fail if isolated_cores contains CPUs which are not present
|
|
assert2=${f:assertion:isolated_cores contains present CPU(s):${isolated_cores_expanded}:${isolated_cores_present_expanded}}
|
|
|
|
[sysctl]
|
|
kernel.hung_task_timeout_secs = 600
|
|
kernel.nmi_watchdog = 0
|
|
vm.stat_interval = 10
|
|
kernel.timer_migration = 1
|
|
|
|
[sysfs]
|
|
/sys/bus/workqueue/devices/writeback/cpumask = ${not_isolated_cpumask}
|
|
/sys/devices/virtual/workqueue/cpumask = ${not_isolated_cpumask}
|
|
/sys/devices/system/machinecheck/machinecheck*/ignore_ce = 1
|
|
|
|
[systemd]
|
|
cpu_affinity=${not_isolated_cores_expanded}
|
|
|
|
[script]
|
|
priority=5
|
|
script=${i:PROFILE_DIR}/script.sh
|
|
|
|
[bootloader]
|
|
priority=10
|
|
initrd_remove_dir=True
|
|
initrd_dst_img=tuned-initrd.img
|
|
initrd_add_dir=${tmpdir}
|
|
cmdline= nohz=on nohz_full=${isolated_cores} rcu_nocbs=${isolated_cores} tuned.non_isolcpus=${not_isolated_cpumask} intel_pstate=disable nosoftlockup
|