This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 7f79421ba6204559fc33d960f9c58ee4bd2ca064 (commit) via d2a23dc8a06ec974cb0254440143b8dab432e3fc (commit) via ff1c6ceb92f014785ec4d90a4bd2ec6802a18bab (commit) via ebefa333864660b8cc8e971f1b963aa31f2dfb3b (commit) via 25c741e1ad3c2a859681e5617f2c7405967b09ef (commit) via da0a56727cc2bc33c7effd54244649c45fd68653 (commit) via 13ec06dcbfb7d26d6b197e8e6f1b058f387e609d (commit) via 7d8f6cc52cadb748ef315525edaad26c948b31fe (commit) via 13910403658b57e2d376d8f30e956223f91dfc1b (commit) from 7f0d32bbbbac6ecd321044cf2e9945bf0a3aba8e (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 7f79421ba6204559fc33d960f9c58ee4bd2ca064 Author: Matias Elo matias.elo@nokia.com Date: Fri May 10 10:14:04 2019 +0300
validation: scheduler: unify test clean-up
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/test/validation/api/scheduler/scheduler.c b/test/validation/api/scheduler/scheduler.c index 0215ecf1d..bcee0d193 100644 --- a/test/validation/api/scheduler/scheduler.c +++ b/test/validation/api/scheduler/scheduler.c @@ -122,24 +122,6 @@ static int drain_queues(void) return ret; }
-static int exit_schedule_loop(void) -{ - odp_event_t ev; - int ret = 0; - - odp_schedule_pause(); - - while ((ev = odp_schedule(NULL, ODP_SCHED_NO_WAIT)) - != ODP_EVENT_INVALID) { - odp_event_free(ev); - ret++; - } - - odp_schedule_resume(); - - return ret; -} - static void release_context(odp_schedule_sync_t sync) { if (sync == ODP_SCHED_SYNC_ATOMIC) @@ -410,16 +392,7 @@ static void scheduler_test_wait(void) }
/* Make sure that scheduler is empty */ - retry = 0; - do { - ret = odp_schedule_multi_no_wait(NULL, &ev, 1); - CU_ASSERT(ret == 0 || ret == 1); - - if (ret) - odp_event_free(ev); - else - retry++; - } while (ret || retry < num_retry); + drain_queues();
CU_ASSERT_FATAL(odp_queue_destroy(queue) == 0); CU_ASSERT_FATAL(odp_pool_destroy(p) == 0); @@ -858,7 +831,7 @@ static void scheduler_test_groups(void) /* Release schduler context and leave groups */ odp_schedule_group_join(mygrp1, &mymask); odp_schedule_group_join(mygrp2, &mymask); - CU_ASSERT(exit_schedule_loop() == 0); + CU_ASSERT(drain_queues() == 0); odp_schedule_group_leave(mygrp1, &mymask); odp_schedule_group_leave(mygrp2, &mymask);
@@ -1282,9 +1255,7 @@ static int schedule_common_(void *arg) odp_ticketlock_unlock(&globals->lock);
/* Clear scheduler atomic / ordered context between tests */ - num = exit_schedule_loop(); - - CU_ASSERT(num == 0); + CU_ASSERT(drain_queues() == 0);
if (num) printf("\nDROPPED %i events\n\n", num); @@ -1738,9 +1709,7 @@ static void scheduler_test_pause_resume(void) odp_buffer_free(buf); }
- ret = exit_schedule_loop(); - - CU_ASSERT(ret == 0); + CU_ASSERT(drain_queues() == 0); }
/* Basic, single threaded ordered lock API testing */ @@ -1810,9 +1779,7 @@ static void scheduler_test_ordered_lock(void) odp_buffer_free(buf); }
- ret = exit_schedule_loop(); - - CU_ASSERT(ret == 0); + CU_ASSERT(drain_queues() == 0); }
static int create_queues(test_globals_t *globals)
commit d2a23dc8a06ec974cb0254440143b8dab432e3fc Author: Matias Elo matias.elo@nokia.com Date: Thu Apr 25 13:21:26 2019 +0300
validation: scheduler: run multithread tests also on core zero
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/test/validation/api/scheduler/scheduler.c b/test/validation/api/scheduler/scheduler.c index 848c683b3..0215ecf1d 100644 --- a/test/validation/api/scheduler/scheduler.c +++ b/test/validation/api/scheduler/scheduler.c @@ -979,7 +979,6 @@ static void chaos_run(unsigned int qtype) CU_ASSERT_PTR_NOT_NULL_FATAL(args);
args->globals = globals; - args->cu_thr.numthrds = globals->num_workers;
odp_queue_param_init(&qp); odp_pool_param_init(¶ms); @@ -1025,17 +1024,20 @@ static void chaos_run(unsigned int qtype) CU_ASSERT_FATAL(rc == 0); }
- /* Run the test */ - odp_cunit_thread_create(chaos_thread, &args->cu_thr); - odp_cunit_thread_exit(&args->cu_thr); + /* Test runs also on the main thread */ + args->cu_thr.numthrds = globals->num_workers - 1; + if (args->cu_thr.numthrds > 0) + odp_cunit_thread_create(chaos_thread, &args->cu_thr); + + chaos_thread(args); + + if (args->cu_thr.numthrds > 0) + odp_cunit_thread_exit(&args->cu_thr);
if (CHAOS_DEBUG) printf("Thread %d returning from chaos threads..cleaning up\n", odp_thread_id());
- drain_queues(); - exit_schedule_loop(); - for (i = 0; i < CHAOS_NUM_QUEUES; i++) { if (CHAOS_DEBUG) printf("Destroying queue %s\n", @@ -1457,11 +1459,17 @@ static void parallel_execute(odp_schedule_sync_t sync, int num_queues, fill_queues(args);
/* Create and launch worker threads */ - args->cu_thr.numthrds = globals->num_workers; - odp_cunit_thread_create(schedule_common_, &args->cu_thr); + + /* Test runs also on the main thread */ + args->cu_thr.numthrds = globals->num_workers - 1; + if (args->cu_thr.numthrds > 0) + odp_cunit_thread_create(schedule_common_, &args->cu_thr); + + schedule_common_(args);
/* Wait for worker threads to terminate */ - odp_cunit_thread_exit(&args->cu_thr); + if (args->cu_thr.numthrds > 0) + odp_cunit_thread_exit(&args->cu_thr);
/* Cleanup ordered queues for next pass */ if (sync == ODP_SCHED_SYNC_ORDERED)
commit ff1c6ceb92f014785ec4d90a4bd2ec6802a18bab Author: Matias Elo matias.elo@nokia.com Date: Wed Apr 24 10:46:48 2019 +0300
validation: scheduler: fix chaos test clean-up
Wait until all threads have finished before doing clean-up.
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/test/validation/api/scheduler/scheduler.c b/test/validation/api/scheduler/scheduler.c index c64abbb83..848c683b3 100644 --- a/test/validation/api/scheduler/scheduler.c +++ b/test/validation/api/scheduler/scheduler.c @@ -928,14 +928,25 @@ static int chaos_thread(void *arg) printf("Thread %d completed %d rounds...terminating\n", odp_thread_id(), CHAOS_NUM_EVENTS);
- exit_schedule_loop(); - end_time = odp_time_local(); diff = odp_time_diff(end_time, start_time);
printf("Thread %d ends, elapsed time = %" PRIu64 "us\n", odp_thread_id(), odp_time_to_ns(diff) / 1000);
+ /* Make sure scheduling context is released */ + odp_schedule_pause(); + while ((ev = odp_schedule(NULL, ODP_SCHED_NO_WAIT)) + != ODP_EVENT_INVALID) { + odp_event_free(ev); + } + + /* Don't resume scheduling until all threads have finished */ + odp_barrier_wait(&globals->barrier); + odp_schedule_resume(); + + drain_queues(); + return 0; }
commit ebefa333864660b8cc8e971f1b963aa31f2dfb3b Author: Matias Elo matias.elo@nokia.com Date: Thu May 9 10:22:05 2019 +0300
validation: scheduler: make sure scheduling context is released
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/test/validation/api/scheduler/scheduler.c b/test/validation/api/scheduler/scheduler.c index 84e0078e6..c64abbb83 100644 --- a/test/validation/api/scheduler/scheduler.c +++ b/test/validation/api/scheduler/scheduler.c @@ -507,6 +507,9 @@ static void scheduler_test_queue_size(void) }
CU_ASSERT(num == queue_size); + + CU_ASSERT(drain_queues() == 0); + CU_ASSERT_FATAL(odp_queue_destroy(queue) == 0); }
@@ -622,6 +625,7 @@ static void scheduler_test_order_ignore(void)
CU_ASSERT(num == queue_size);
+ CU_ASSERT(drain_queues() == 0); CU_ASSERT_FATAL(odp_queue_destroy(ordered) == 0); CU_ASSERT_FATAL(odp_queue_destroy(plain) == 0); CU_ASSERT_FATAL(odp_pool_destroy(pool) == 0);
commit 25c741e1ad3c2a859681e5617f2c7405967b09ef Author: Matias Elo matias.elo@nokia.com Date: Wed May 8 17:45:20 2019 +0300
validation: scheduler: add missing clean-up to scheduler_test_ordered_lock
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/test/validation/api/scheduler/scheduler.c b/test/validation/api/scheduler/scheduler.c index 045e7ba9c..84e0078e6 100644 --- a/test/validation/api/scheduler/scheduler.c +++ b/test/validation/api/scheduler/scheduler.c @@ -1771,6 +1771,7 @@ static void scheduler_test_ordered_lock(void)
if (lock_count < 2) { printf(" ONLY ONE ORDERED LOCK. Unlock_lock not tested.\n"); + CU_ASSERT(drain_queues() == BUFS_PER_QUEUE / 2); return; }
commit da0a56727cc2bc33c7effd54244649c45fd68653 Author: Matias Elo matias.elo@nokia.com Date: Wed Apr 24 09:52:47 2019 +0300
validation: scheduler: make sure scheduling context is released
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/test/validation/api/scheduler/scheduler.c b/test/validation/api/scheduler/scheduler.c index 446d03d38..045e7ba9c 100644 --- a/test/validation/api/scheduler/scheduler.c +++ b/test/validation/api/scheduler/scheduler.c @@ -307,6 +307,10 @@ static void scheduler_test_queue_destroy(void)
odp_buffer_free(buf); release_context(qp.sched.sync); + + /* Make sure atomic/ordered context is released */ + CU_ASSERT(drain_queues() == 0); + CU_ASSERT_FATAL(odp_queue_destroy(queue) == 0); }
commit 13ec06dcbfb7d26d6b197e8e6f1b058f387e609d Author: Matias Elo matias.elo@nokia.com Date: Fri Apr 26 14:15:22 2019 +0300
validation: scheduler: remove unused define
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/test/validation/api/scheduler/scheduler.c b/test/validation/api/scheduler/scheduler.c index ec2baa8ff..446d03d38 100644 --- a/test/validation/api/scheduler/scheduler.c +++ b/test/validation/api/scheduler/scheduler.c @@ -11,7 +11,6 @@ #include "odp_cunit_common.h" #include <odp/helper/odph_api.h>
-#define MAX_WORKERS_THREADS 32 #define MAX_ORDERED_LOCKS 2 #define MSG_POOL_SIZE (64 * 1024) #define QUEUES_PER_PRIO 16
commit 7d8f6cc52cadb748ef315525edaad26c948b31fe Author: Matias Elo matias.elo@nokia.com Date: Tue Apr 23 14:42:05 2019 +0300
validation: scheduler: fix groups test
Scheduler implementation could pre-schedule events to mygrp2 causing the following check to fail.
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/test/validation/api/scheduler/scheduler.c b/test/validation/api/scheduler/scheduler.c index 7ad6acf48..ec2baa8ff 100644 --- a/test/validation/api/scheduler/scheduler.c +++ b/test/validation/api/scheduler/scheduler.c @@ -1,4 +1,5 @@ /* Copyright (c) 2014-2018, Linaro Limited + * Copyright (c) 2019, Nokia * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause @@ -722,6 +723,10 @@ static void scheduler_test_groups(void) CU_ASSERT(rc == 0); CU_ASSERT(odp_thrmask_isset(&testmask, thr_id));
+ /* Leave group 2 */ + rc = odp_schedule_group_leave(mygrp2, &mymask); + CU_ASSERT(rc == 0); + /* Now verify scheduler adherence to groups */ odp_pool_param_init(¶ms); params.buf.size = 100;
commit 13910403658b57e2d376d8f30e956223f91dfc1b Author: Matias Elo matias.elo@nokia.com Date: Fri May 10 15:58:31 2019 +0300
test: scheduling: resume scheduling only after sync barrier
Prevents pre-scheduling events to finished threads.
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Petri Savolainen petri.savolainen@nokia.com
diff --git a/test/performance/odp_scheduling.c b/test/performance/odp_scheduling.c index 9b9981a44..e44e196c3 100644 --- a/test/performance/odp_scheduling.c +++ b/test/performance/odp_scheduling.c @@ -396,12 +396,13 @@ static int test_schedule_single(const char *str, int thr, } }
- odp_schedule_resume(); - c2 = odp_cpu_cycles(); cycles = odp_cpu_cycles_diff(c2, c1);
odp_barrier_wait(&globals->barrier); + + odp_schedule_resume(); + clear_sched_queues();
cycles = cycles / tot; @@ -469,12 +470,13 @@ static int test_schedule_many(const char *str, int thr, } }
- odp_schedule_resume(); - c2 = odp_cpu_cycles(); cycles = odp_cpu_cycles_diff(c2, c1);
odp_barrier_wait(&globals->barrier); + + odp_schedule_resume(); + clear_sched_queues();
cycles = cycles / tot; @@ -557,12 +559,13 @@ static int test_schedule_multi(const char *str, int thr, } }
- odp_schedule_resume(); - c2 = odp_cpu_cycles(); cycles = odp_cpu_cycles_diff(c2, c1);
odp_barrier_wait(&globals->barrier); + + odp_schedule_resume(); + clear_sched_queues();
if (tot)
-----------------------------------------------------------------------
Summary of changes: test/performance/odp_scheduling.c | 15 +++-- test/validation/api/scheduler/scheduler.c | 101 +++++++++++++++--------------- 2 files changed, 59 insertions(+), 57 deletions(-)
hooks/post-receive