Return-Path: From: "Daniel Sangorrin" References: <1542255972-10772-1-git-send-email-qiutt@cn.fujitsu.com> <1542255972-10772-12-git-send-email-qiutt@cn.fujitsu.com> In-Reply-To: <1542255972-10772-12-git-send-email-qiutt@cn.fujitsu.com> Date: Fri, 16 Nov 2018 14:31:02 +0900 Message-ID: <000001d47d6d$90083030$b0189090$@toshiba.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Language: ja Subject: Re: [Fuego] [PATCH 12/15] svsematest: fix unavailable cpu num of PARAMS List-Id: Mailing list for the Fuego test framework List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Qiu Tingting' , fuego@lists.linuxfoundation.org Hi Qiu, Please see my comments below. > -----Original Message----- > On Behalf Of Qiu Tingting > Sent: Thursday, November 15, 2018 1:26 PM > To: fuego@lists.linuxfoundation.org > Subject: [Fuego] [PATCH 12/15] svsematest: fix unavailable cpu num of = PARAMS >=20 > Cmd svsematest has -t num parameter. > When cpu num is not setted, default value is max num of cpu. > Maybe some of cpu is not working, so we should set the available cpu = num. >=20 > Signed-off-by: Qiu Tingting > --- > engine/tests/Benchmark.svsematest/fuego_test.sh | 2 +- > engine/tests/Benchmark.svsematest/spec.json | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/engine/tests/Benchmark.svsematest/fuego_test.sh > b/engine/tests/Benchmark.svsematest/fuego_test.sh > index f2ebd18..2988cd4 100755 > --- a/engine/tests/Benchmark.svsematest/fuego_test.sh > +++ b/engine/tests/Benchmark.svsematest/fuego_test.sh > @@ -21,5 +21,5 @@ function test_run { > # The number for getting the lines depends on the cpu number of = target > machine. > target_cpu_number=3D$(cmd "cat /proc/cpuinfo | grep processor | = wc -l") This will not work if you have a "hole" in your cpus (E.g: if you have = cpu 0,1,3 online, but cpu 2 offline) > getting_line_number=3D$(( $target_cpu_number + $target_cpu_number = )) > - report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./svsematest > $BENCHMARK_SVSEMATEST_PARAMS | tail -$getting_line_number" > + report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./svsematest > $BENCHMARK_SVSEMATEST_PARAMS$target_cpu_number | tail > -$getting_line_number" > } The number of threads should be specified in the spec, not limited to = the number of online cores. For example, I may want to run 200 threads = on two cores. Instead, what you want to use is the -a (affinity) = argument. Unfortunately, unlike cyclictest, it seems that in svsematest = you can only specify a single cpu number instead of a cpu set. > diff --git a/engine/tests/Benchmark.svsematest/spec.json > b/engine/tests/Benchmark.svsematest/spec.json > index 00e77c1..e814600 100644 > --- a/engine/tests/Benchmark.svsematest/spec.json > +++ b/engine/tests/Benchmark.svsematest/spec.json > @@ -2,13 +2,13 @@ > "testName": "Benchmark.svsematest", > "specs": { > "default": { > - "PARAMS": "-a -t -p99 -i100 -d25 -l10000" > + "PARAMS": "-a -p99 -i100 -d25 -l10000 -t" Putting the -t at the end is not a good idea. If we really wanted to handle -t automatically, as you suggest, then you = should put add -t directly inside fuego_test.sh. # as I said though, what we want to modify is the affinity By the way, you should think of values in spec.json files as common = examples. You can override them with values specific to your board in = two ways: 1) Specifying the value on your board definition file BENCHMARK_SVSEMATEST_PARAMS=3D"-a 1 -t -p99 -i100 -d25 -l1000" Tim: I just tested it and prolog.sh is not overriding the variable, = might be a regression! Tim: it seems that ftc:get_specs still doesn't support spec files in = fuego-ro/boards or absolute paths. Shall I fix that? 2) Using the option --dynamic-vars (ftc run-test --help) Summarizing, I think there are mainly two things we can do: - Modify the spec for your board by setting the affinity (-a N) to a = processor you know it's going to be online (you can do that in two ways = as I said) - Patch the program to specify affinity as a set of cpus (as in = cyclictest) and then calculate that affinity automatically by using = /proc/cpuinfo (unless the user already had specified it on the spec). Thanks Daniel > }, > "latest": { > "PER_JOB_BUILD": "true", > "gitrepo": = "https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git", > "gitref": "unstable/devel/latest", > - "PARAMS": "-a -t -p99 -i100 -d25 -l10000" > + "PARAMS": "-a -p99 -i100 -d25 -l10000 -t" > } > } > } > -- > 2.7.4 >=20 >=20 >=20 > _______________________________________________ > Fuego mailing list > Fuego@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/fuego