diff mbox

[v3] test: perf: add prime num threads to odp_scheduling

Message ID 1472487350-32285-1-git-send-email-mike.holmes@linaro.org
State Accepted
Commit 40fb071be7c22776a190d1c7fa32b100510e2b82
Headers show

Commit Message

Mike Holmes Aug. 29, 2016, 4:15 p.m. UTC
A recent bug showed the limitations of using powers of two, add a prime
number of threads as a new test case.

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

---
v3:
   Improve test docs to note that 0=all CPUs and use that

 test/common_plat/performance/odp_scheduling.c             | 2 +-
 test/common_plat/performance/odp_scheduling_run.sh        | 6 +++++-
 test/linux-generic/performance/odp_scheduling_run_proc.sh | 6 +++++-
 3 files changed, 11 insertions(+), 3 deletions(-)

-- 
2.7.4

Comments

Bill Fischofer Aug. 29, 2016, 4:28 p.m. UTC | #1
On Mon, Aug 29, 2016 at 11:15 AM, Mike Holmes <mike.holmes@linaro.org>
wrote:

> A recent bug showed the limitations of using powers of two, add a prime

> number of threads as a new test case.

>

> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

>


Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>



> ---

> v3:

>    Improve test docs to note that 0=all CPUs and use that

>

>  test/common_plat/performance/odp_scheduling.c             | 2 +-

>  test/common_plat/performance/odp_scheduling_run.sh        | 6 +++++-

>  test/linux-generic/performance/odp_scheduling_run_proc.sh | 6 +++++-

>  3 files changed, 11 insertions(+), 3 deletions(-)

>

> diff --git a/test/common_plat/performance/odp_scheduling.c

> b/test/common_plat/performance/odp_scheduling.c

> index 1de79f7..9407636 100644

> --- a/test/common_plat/performance/odp_scheduling.c

> +++ b/test/common_plat/performance/odp_scheduling.c

> @@ -723,7 +723,7 @@ static void print_usage(void)

>  {

>         printf("\n\nUsage: ./odp_example [options]\n");

>         printf("Options:\n");

> -       printf("  -c, --count <number>    CPU count\n");

> +       printf("  -c, --count <number>    CPU count, 0=all available,

> default=0\n");

>         printf("  -h, --help              this help\n");

>         printf("  -f, --fair              collect fairness statistics\n");

>         printf("\n\n");

> diff --git a/test/common_plat/performance/odp_scheduling_run.sh

> b/test/common_plat/performance/odp_scheduling_run.sh

> index 755b0c1..a22326d 100755

> --- a/test/common_plat/performance/odp_scheduling_run.sh

> +++ b/test/common_plat/performance/odp_scheduling_run.sh

> @@ -10,16 +10,20 @@

>

>  TEST_DIR="${TEST_DIR:-$(dirname $0)}"

>  ret=0

> +ALL=0

>

>  run()

>  {

> -       echo odp_scheduling_run starts with $1 worker threads

> +       echo odp_scheduling_run starts requesting $1 worker threads

>         echo ===============================================

>

>         $TEST_DIR/odp_scheduling${EXEEXT} -c $1 || ret=1

>  }

>

>  run 1

> +run 5

>  run 8

> +run 11

> +run $ALL

>

>  exit $ret

> diff --git a/test/linux-generic/performance/odp_scheduling_run_proc.sh

> b/test/linux-generic/performance/odp_scheduling_run_proc.sh

> index b3ef26f..384017a 100755

> --- a/test/linux-generic/performance/odp_scheduling_run_proc.sh

> +++ b/test/linux-generic/performance/odp_scheduling_run_proc.sh

> @@ -11,16 +11,20 @@

>  TEST_DIR="${TEST_DIR:-$(dirname $0)}"

>  PERFORMANCE="$TEST_DIR/../../common_plat/performance"

>  ret=0

> +ALL=0

>

>  run()

>  {

> -       echo odp_scheduling_run_proc starts with $1 worker threads

> +       echo odp_scheduling_run starts requesting $1 worker threads

>         echo =====================================================

>

>         $PERFORMANCE/odp_scheduling${EXEEXT} --odph_proc -c $1 || ret=1

>  }

>

>  run 1

> +run 5

>  run 8

> +run 11

> +run $ALL

>

>  exit $ret

> --

> 2.7.4

>

>
Maxim Uvarov Aug. 30, 2016, 7:39 a.m. UTC | #2
Merged,
Maxim.

On 08/29/16 19:28, Bill Fischofer wrote:
> On Mon, Aug 29, 2016 at 11:15 AM, Mike Holmes <mike.holmes@linaro.org>

> wrote:

>

>> A recent bug showed the limitations of using powers of two, add a prime

>> number of threads as a new test case.

>>

>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

>>

> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>

>

>

>> ---

>> v3:

>>     Improve test docs to note that 0=all CPUs and use that

>>

>>   test/common_plat/performance/odp_scheduling.c             | 2 +-

>>   test/common_plat/performance/odp_scheduling_run.sh        | 6 +++++-

>>   test/linux-generic/performance/odp_scheduling_run_proc.sh | 6 +++++-

>>   3 files changed, 11 insertions(+), 3 deletions(-)

>>

>> diff --git a/test/common_plat/performance/odp_scheduling.c

>> b/test/common_plat/performance/odp_scheduling.c

>> index 1de79f7..9407636 100644

>> --- a/test/common_plat/performance/odp_scheduling.c

>> +++ b/test/common_plat/performance/odp_scheduling.c

>> @@ -723,7 +723,7 @@ static void print_usage(void)

>>   {

>>          printf("\n\nUsage: ./odp_example [options]\n");

>>          printf("Options:\n");

>> -       printf("  -c, --count <number>    CPU count\n");

>> +       printf("  -c, --count <number>    CPU count, 0=all available,

>> default=0\n");

>>          printf("  -h, --help              this help\n");

>>          printf("  -f, --fair              collect fairness statistics\n");

>>          printf("\n\n");

>> diff --git a/test/common_plat/performance/odp_scheduling_run.sh

>> b/test/common_plat/performance/odp_scheduling_run.sh

>> index 755b0c1..a22326d 100755

>> --- a/test/common_plat/performance/odp_scheduling_run.sh

>> +++ b/test/common_plat/performance/odp_scheduling_run.sh

>> @@ -10,16 +10,20 @@

>>

>>   TEST_DIR="${TEST_DIR:-$(dirname $0)}"

>>   ret=0

>> +ALL=0

>>

>>   run()

>>   {

>> -       echo odp_scheduling_run starts with $1 worker threads

>> +       echo odp_scheduling_run starts requesting $1 worker threads

>>          echo ===============================================

>>

>>          $TEST_DIR/odp_scheduling${EXEEXT} -c $1 || ret=1

>>   }

>>

>>   run 1

>> +run 5

>>   run 8

>> +run 11

>> +run $ALL

>>

>>   exit $ret

>> diff --git a/test/linux-generic/performance/odp_scheduling_run_proc.sh

>> b/test/linux-generic/performance/odp_scheduling_run_proc.sh

>> index b3ef26f..384017a 100755

>> --- a/test/linux-generic/performance/odp_scheduling_run_proc.sh

>> +++ b/test/linux-generic/performance/odp_scheduling_run_proc.sh

>> @@ -11,16 +11,20 @@

>>   TEST_DIR="${TEST_DIR:-$(dirname $0)}"

>>   PERFORMANCE="$TEST_DIR/../../common_plat/performance"

>>   ret=0

>> +ALL=0

>>

>>   run()

>>   {

>> -       echo odp_scheduling_run_proc starts with $1 worker threads

>> +       echo odp_scheduling_run starts requesting $1 worker threads

>>          echo =====================================================

>>

>>          $PERFORMANCE/odp_scheduling${EXEEXT} --odph_proc -c $1 || ret=1

>>   }

>>

>>   run 1

>> +run 5

>>   run 8

>> +run 11

>> +run $ALL

>>

>>   exit $ret

>> --

>> 2.7.4

>>

>>
diff mbox

Patch

diff --git a/test/common_plat/performance/odp_scheduling.c b/test/common_plat/performance/odp_scheduling.c
index 1de79f7..9407636 100644
--- a/test/common_plat/performance/odp_scheduling.c
+++ b/test/common_plat/performance/odp_scheduling.c
@@ -723,7 +723,7 @@  static void print_usage(void)
 {
 	printf("\n\nUsage: ./odp_example [options]\n");
 	printf("Options:\n");
-	printf("  -c, --count <number>    CPU count\n");
+	printf("  -c, --count <number>    CPU count, 0=all available, default=0\n");
 	printf("  -h, --help              this help\n");
 	printf("  -f, --fair              collect fairness statistics\n");
 	printf("\n\n");
diff --git a/test/common_plat/performance/odp_scheduling_run.sh b/test/common_plat/performance/odp_scheduling_run.sh
index 755b0c1..a22326d 100755
--- a/test/common_plat/performance/odp_scheduling_run.sh
+++ b/test/common_plat/performance/odp_scheduling_run.sh
@@ -10,16 +10,20 @@ 
 
 TEST_DIR="${TEST_DIR:-$(dirname $0)}"
 ret=0
+ALL=0
 
 run()
 {
-	echo odp_scheduling_run starts with $1 worker threads
+	echo odp_scheduling_run starts requesting $1 worker threads
 	echo ===============================================
 
 	$TEST_DIR/odp_scheduling${EXEEXT} -c $1 || ret=1
 }
 
 run 1
+run 5
 run 8
+run 11
+run $ALL
 
 exit $ret
diff --git a/test/linux-generic/performance/odp_scheduling_run_proc.sh b/test/linux-generic/performance/odp_scheduling_run_proc.sh
index b3ef26f..384017a 100755
--- a/test/linux-generic/performance/odp_scheduling_run_proc.sh
+++ b/test/linux-generic/performance/odp_scheduling_run_proc.sh
@@ -11,16 +11,20 @@ 
 TEST_DIR="${TEST_DIR:-$(dirname $0)}"
 PERFORMANCE="$TEST_DIR/../../common_plat/performance"
 ret=0
+ALL=0
 
 run()
 {
-	echo odp_scheduling_run_proc starts with $1 worker threads
+	echo odp_scheduling_run starts requesting $1 worker threads
 	echo =====================================================
 
 	$PERFORMANCE/odp_scheduling${EXEEXT} --odph_proc -c $1 || ret=1
 }
 
 run 1
+run 5
 run 8
+run 11
+run $ALL
 
 exit $ret