File: benchmark-prologue.sh

package info (click to toggle)
libatomic-queue 0.0%2Bgit20220518.83774a2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,352 kB
  • sloc: cpp: 1,620; javascript: 353; makefile: 131; python: 82; ansic: 74; sh: 59
file content (14 lines) | stat: -rwxr-xr-x 476 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/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

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