From c5b77e52c2b6fb439e0e450a120812e8a5dc2889 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Thu, 3 Jan 2019 11:34:43 +0100 Subject: 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 --- automated/linux/cyclictest/cyclictest.sh | 14 ++++++++------ automated/linux/cyclictest/cyclictest.yaml | 10 ++++++---- 2 files changed, 14 insertions(+), 10 deletions(-) (limited to 'automated/linux/cyclictest') 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 -- cgit v1.2.3