File: benchmark-prologue.sh

package info (click to toggle)
libatomic-queue 0.0%2Bgit20201108.d9d66b6-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 34,152 kB
  • sloc: cpp: 1,601; javascript: 350; makefile: 137; python: 122; sh: 61; ansic: 52
file content (15 lines) | stat: -rwxr-xr-x 511 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

set +e # Ignore failures.

sudo hugeadm --pool-pages-min 1GB:1 --pool-pages-max 1GB:1
sudo cpupower frequency-set --related --governor performance >/dev/null
~/scripts/cpu-fans.sh 5 >/dev/null

if [[ -e /proc/sys/kernel/sched_rt_runtime_us ]]; then
    if [[ ! -e .sched_rt_runtime_us.txt ]]; then
        cat /proc/sys/kernel/sched_rt_runtime_us >.sched_rt_runtime_us.txt~
        mv -f .sched_rt_runtime_us.txt{~,}
    fi
    echo -1 | sudo tee /proc/sys/kernel/sched_rt_runtime_us >/dev/null
fi