On 09.11.15 15:12, Maxim Uvarov wrote:
On 11/09/2015 16:09, Maxim Uvarov wrote:
after that patch that scheduler fails:
FAIL: ../../../test/validation/scheduler/scheduler_main
for arm64.
Maxim.
brrr, that changes for generator. Interesting...
Maxim.
Interesting, maybe it was after 3/6 patch....?
Then I can check again.
But after this change it can reveal some other bug only.
Strange.
On 11/05/2015 18:33, Ivan Khoronzhuk wrote:
It's more accurate to compare ticks instead of ns in each
iteration, so calculate wait range before entering the loop.
Signed-off-by: Ivan Khoronzhuk <ivan.khoronz...@linaro.org>
---
example/generator/odp_generator.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/example/generator/odp_generator.c
b/example/generator/odp_generator.c
index 60e015b..dd30403 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -586,7 +586,7 @@ static void *gen_recv_thread(void *arg)
*/
static void print_global_stats(int num_workers)
{
- uint64_t start, now, diff;
+ uint64_t start, wait, diff;
uint64_t pkts, pkts_prev = 0, pps, maximum_pps = 0;
int verbose_interval = 20;
odp_thrmask_t thrd_mask;
@@ -594,6 +594,7 @@ static void print_global_stats(int num_workers)
while (odp_thrmask_worker(&thrd_mask) < num_workers)
continue;
+ wait = odp_time_ns_to_cycles(verbose_interval * ODP_TIME_SEC);
start = odp_time_cycles();
while (odp_thrmask_worker(&thrd_mask) == num_workers) {
@@ -603,12 +604,9 @@ static void print_global_stats(int num_workers)
break;
}
- now = odp_time_cycles();
- diff = odp_time_diff_cycles(start, now);
- if (odp_time_cycles_to_ns(diff) <
- verbose_interval * ODP_TIME_SEC) {
+ diff = odp_time_diff_cycles(start, odp_time_cycles());
+ if (diff < wait)
continue;
- }
start = odp_time_cycles();
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp
--
Regards,
Ivan Khoronzhuk
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp