From 9ac732c0883bded548d83f9bc02e20328fe0593b Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Tue, 10 Sep 2019 15:08:27 +0000 Subject: tcwg-tk1-cpucore: Make sure that docker has access to all CPU cores It may happen that docker cpuset cgroup can get mounted before all cores are online, so explicitly update cpuset.cpus cgroup files. Also add variant of rc.local used on llvm-tk1-02 (LLVM performance bot) for safe-keeping. Change-Id: Ib287e15a39f8f8e1eaca8fba68748f65ec1d7c93 --- playbooks/roles/tcwg-tk1-cpucore/files/rc.local | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'playbooks/roles/tcwg-tk1-cpucore/files/rc.local') diff --git a/playbooks/roles/tcwg-tk1-cpucore/files/rc.local b/playbooks/roles/tcwg-tk1-cpucore/files/rc.local index a55d5e8..b4749d7 100644 --- a/playbooks/roles/tcwg-tk1-cpucore/files/rc.local +++ b/playbooks/roles/tcwg-tk1-cpucore/files/rc.local @@ -11,18 +11,21 @@ # # By default this script does nothing. -trap "touch /tmp/rc_local_failed" EXIT - -rm -f /tmp/rc_local_failed +rm -f /tmp/rc_local.log +exec 1>/tmp/rc_local.log 2>&1 +set -x +# Bring all CPUs online echo 0 > /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable -for cpu in /sys/devices/system/cpu/cpu*; do +for cpu in /sys/devices/system/cpu/cpu[0-3]; do if [ x"$(cat $cpu/online)" = x"0" ]; then echo 1 > $cpu/online fi done -trap "" EXIT +# Make sure docker containers are configured to use all CPUs. +for cpuset in $(find /sys/fs/cgroup/cpuset/ -name cpuset.cpus); do + echo 0-3 > $cpuset +done exit 0 - -- cgit v1.2.3