[Fuego] [PATCH] fix_Benchmark_cyclictest_with_env

Daniel Sangorrin daniel.sangorrin at toshiba.co.jp
Thu Jul 26 04:17:28 UTC 2018


Hello Li,

> -----Original Message-----
> From: fuego-bounces at lists.linuxfoundation.org
> <fuego-bounces at lists.linuxfoundation.org> On Behalf Of Li, Xiaoming
> Sent: Thursday, July 26, 2018 12:46 PM
> To: fuego at lists.linuxfoundation.org
> Subject: [Fuego] [PATCH] fix_Benchmark_cyclictest_with_env
> 
> 
> Details: When running on intel-up2, report an error of  "Unable to change
> scheduling policy! either run as root or join realtime group".
> As systemd defaults put ssh connections into a non-RT cgroup,  ssh in and running
> FIFO/RR tasks won't work.
> To fix this, add "sysctl -w kernel.sched_rt_runtime_us=-1".   It will  move  shell
> into the default cpu:/ group which does permit priority scheduling.

That is a bit weird. There should be another way.
The purpose of sched_rt_runtime_us is to set what percentage of cpu is left for non-rt tasks in case an rt-task hogs the cpu. It has nothing to do with permissions hummm.
# Also you are not checking if the target board is actually using systemd.
# kernel.sched_rt_runtime_us=-1 is actually a good setting for testing (maybe not production) the rt performance with cyclictest
What OS are you using?

Thanks,
Daniel

> It looks like even the console is restricted. We have only tested it  on x86-64 and
> arm-64. This may only occurs on x86-64,  arm_64 has no such restriction.
> 
> Signed-off-by: Li Xiaoming <lixm.fnst at cn.fujitsu.com>
> ---
>  engine/tests/Benchmark.cyclictest/fuego_test.sh | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/engine/tests/Benchmark.cyclictest/fuego_test.sh
> b/engine/tests/Benchmark.cyclictest/fuego_test.sh
> index 319f361..edf37c8 100755
> --- a/engine/tests/Benchmark.cyclictest/fuego_test.sh
> +++ b/engine/tests/Benchmark.cyclictest/fuego_test.sh
> @@ -16,5 +16,16 @@ function test_deploy {  }
> 
>  function test_run {
> +    LOG_TMPFILE="$LOGDIR/sched_rt_runtime_us"
> +
> BOARD_TMPFILE="$BOARD_TESTDIR/fuego.$TESTDIR/sched_rt_runtime_us"
> +    if [ $ARCHITECTURE == "x86_64" ]; then
> +        cmd "cat /proc/sys/kernel/sched_rt_runtime_us > $BOARD_TMPFILE; \
> +            sysctl -w kernel.sched_rt_runtime_us=-1";
> +        get $BOARD_TMPFILE $LOG_TMPFILE;
> +    fi
>      report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./cyclictest
> $BENCHMARK_CYCLICTEST_PARAMS"
> +    if [ $ARCHITECTURE == "x86_64" ]; then
> +        cmd "sysctl -w kernel.sched_rt_runtime_us=$(cat $LOG_TMPFILE)";
> +    fi
> +
>  }
> --
> 2.7.4
> 
> 
> 
> _______________________________________________
> Fuego mailing list
> Fuego at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/fuego



More information about the Fuego mailing list