File: benchmark-prologue.sh

package info (click to toggle)
libatomic-queue 1.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 13,336 kB
  • sloc: cpp: 1,704; javascript: 368; makefile: 126; ansic: 91; python: 82; sh: 60
file content (14 lines) | stat: -rwxr-xr-x 453 bytes parent folder | download | duplicates (2)
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
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