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 d20f3a639d236066cbd76514df5c4faaa0ae17e9 (commit) from 8eba3e76f32bb2d17b88ba13f633606fef61efe8 (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 d20f3a639d236066cbd76514df5c4faaa0ae17e9 Author: Brian Brooks brian.brooks@arm.com Date: Tue Apr 4 13:47:59 2017 -0500
test: odp_scheduling: handle dequeueing from a concurrent queue
Signed-off-by: Ola Liljedahl ola.liljedahl@arm.com Reviewed-by: Brian Brooks brian.brooks@arm.com Reviewed-by: Honnappa Nagarahalli honnappa.nagarahalli@arm.com Reviewed-by: Kevin Wang kevin.wang@arm.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/common_plat/performance/odp_scheduling.c b/test/common_plat/performance/odp_scheduling.c index c74a0713..38e76257 100644 --- a/test/common_plat/performance/odp_scheduling.c +++ b/test/common_plat/performance/odp_scheduling.c @@ -273,7 +273,7 @@ static int test_plain_queue(int thr, test_globals_t *globals) test_message_t *t_msg; odp_queue_t queue; uint64_t c1, c2, cycles; - int i; + int i, j;
/* Alloc test message */ buf = odp_buffer_alloc(globals->pool); @@ -307,7 +307,15 @@ static int test_plain_queue(int thr, test_globals_t *globals) return -1; }
- ev = odp_queue_deq(queue); + /* When enqueue and dequeue are decoupled (e.g. not using a + * common lock), an enqueued event may not be immediately + * visible to dequeue. So we just try again for a while. */ + for (j = 0; j < 100; j++) { + ev = odp_queue_deq(queue); + if (ev != ODP_EVENT_INVALID) + break; + odp_cpu_pause(); + }
buf = odp_buffer_from_event(ev);
-----------------------------------------------------------------------
Summary of changes: test/common_plat/performance/odp_scheduling.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
hooks/post-receive