aboutsummaryrefslogtreecommitdiff
path: root/automated/linux/cyclictest
diff options
context:
space:
mode:
authorDaniel Wagner <wagi@monom.org>2019-01-03 11:34:43 +0100
committerDaniel Wagner <wagi@monom.org>2019-07-22 11:35:09 +0200
commitc5b77e52c2b6fb439e0e450a120812e8a5dc2889 (patch)
treed72ce3483fc0cb68c2e0881a77a069ec55385d0c /automated/linux/cyclictest
parent611b541bc7ef37cf456c5d6b25660c34283c625e (diff)
cyclictest: Update parameters
Don't run cyclictest at priority 99 because the highest priority is for the high priority kernel tasks. The highest user land priority is 98. Furthermore, we should make sure the threads are not migrated (set the affinity). Also all memory should preallocated (mlockall) before starting the measurement. Additional the recommended why to sleep is to use clock_nanosleep which is not default. And finally also set the interval to 1000us which most -rt maintainers are using. This allows to compare the result easier. Signed-off-by: Daniel Wagner <wagi@monom.org>
Diffstat (limited to 'automated/linux/cyclictest')
-rwxr-xr-xautomated/linux/cyclictest/cyclictest.sh14
-rw-r--r--automated/linux/cyclictest/cyclictest.yaml10
2 files changed, 14 insertions, 10 deletions
diff --git a/automated/linux/cyclictest/cyclictest.sh b/automated/linux/cyclictest/cyclictest.sh
index 88bb4d55..a19faef1 100755
--- a/automated/linux/cyclictest/cyclictest.sh
+++ b/automated/linux/cyclictest/cyclictest.sh
@@ -10,21 +10,23 @@ OUTPUT="$(pwd)/output"
LOGFILE="${OUTPUT}/cyclictest.txt"
RESULT_FILE="${OUTPUT}/result.txt"
-PRIORITY="99"
-INTERVAL="10000"
+PRIORITY="98"
+INTERVAL="1000"
THREADS="1"
-LOOPS="10000"
+AFFINITY="0"
+LOOPS="100000"
usage() {
echo "Usage: $0 [-p priority] [-i interval] [-t threads] [-l loops]" 1>&2
exit 1
}
-while getopts ":p:i:t:l:" opt; do
+while getopts ":p:i:t:a:l:" opt; do
case "${opt}" in
p) PRIORITY="${OPTARG}" ;;
i) INTERVAL="${OPTARG}" ;;
t) THREADS="${OPTARG}" ;;
+ a) AFFINITY="${OPTARG}" ;;
l) LOOPS="${OPTARG}" ;;
*) usage ;;
esac
@@ -39,8 +41,8 @@ if ! binary=$(which cyclictest); then
# shellcheck disable=SC2154
binary="./bin/${abi}/cyclictest"
fi
-"${binary}" -p "${PRIORITY}" -i "${INTERVAL}" -t "${THREADS}" \
- -l "${LOOPS}" | tee "${LOGFILE}"
+"${binary}" -p "${PRIORITY}" -i "${INTERVAL}" -t "${THREADS}" -a "${AFFINITY}" \
+ -l "${LOOPS}" -m -n | tee "${LOGFILE}"
# Parse test log.
tail -n "${THREADS}" "${LOGFILE}" \
diff --git a/automated/linux/cyclictest/cyclictest.yaml b/automated/linux/cyclictest/cyclictest.yaml
index 12736666..a0943329 100644
--- a/automated/linux/cyclictest/cyclictest.yaml
+++ b/automated/linux/cyclictest/cyclictest.yaml
@@ -29,16 +29,18 @@ metadata:
params:
# Priority of highest prio thread.
- PRIORITY: "99"
+ PRIORITY: "98"
# Base interval of thread in us.
- INTERVAL: "10000"
+ INTERVAL: "1000"
# Number of threads.
THREADS: "1"
+ # Set the affinity
+ AFFINITY: "0"
# Number of loops.
- LOOPS: "10000"
+ LOOPS: "100000"
run:
steps:
- cd ./automated/linux/cyclictest/
- - ./cyclictest.sh -p "${PRIORITY}" -i "${INTERVAL}" -t "${THREADS}" -l "${LOOPS}"
+ - ./cyclictest.sh -p "${PRIORITY}" -i "${INTERVAL}" -t "${THREADS}" -a "${AFFINITY}" -l "${LOOPS}"
- ../../utils/send-to-lava.sh ./output/result.txt