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, api-next has been updated via 3547226b19e6982bf74fc8c258b89db2c5f6a39c (commit) via 762372f299b64c8c30c3f5a0ba51fbb48e234e1e (commit) via 65d0fbba8366f68a8fe24426bc0e16ea3cd3cd04 (commit) via edc288690b65167b347a0e8c2c171198e4d2fbe3 (commit) from e420668cd3886f003c8bd6022e210bf08a0ee3b5 (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 3547226b19e6982bf74fc8c258b89db2c5f6a39c Author: Joyce Kong joyce.kong@arm.com Date: Mon Aug 7 14:27:34 2017 +0800
linux-gen: timer: control timer pool polling frequency dynamically
Adjust frequency of timer pool polling by the duration of timer. There needs to be 0 timer pool polling when no timer pool created.
Signed-off-by: Joyce Kong joyce.kong@arm.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/include/odp_timer_internal.h b/platform/linux-generic/include/odp_timer_internal.h index 67ee9fef..0759f727 100644 --- a/platform/linux-generic/include/odp_timer_internal.h +++ b/platform/linux-generic/include/odp_timer_internal.h @@ -20,9 +20,6 @@ #include <odp_pool_internal.h> #include <odp/api/timer.h>
-/* Minimum number of nanoseconds between checking timer pools. */ -#define CONFIG_TIMER_RUN_RATELIMIT_NS 100 - /* Minimum number of scheduling rounds between checking timer pools. */ #define CONFIG_TIMER_RUN_RATELIMIT_ROUNDS 1
diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c index fdb48902..b359f7c6 100644 --- a/platform/linux-generic/odp_timer.c +++ b/platform/linux-generic/odp_timer.c @@ -75,6 +75,7 @@ static _odp_atomic_flag_t locks[NUM_LOCKS]; /* Multiple locks per cache line! */
/* Max timer resolution in nanoseconds */ static uint64_t highest_res_ns; +static uint64_t min_res_ns = INT64_MAX;
/****************************************************************************** * Translation between timeout buffer and timeout header @@ -742,6 +743,9 @@ unsigned _timer_run(void) CONFIG_TIMER_RUN_RATELIMIT_ROUNDS; odp_time_t now;
+ if (odp_atomic_load_u32(&num_timer_pools) == 0) + return 0; + /* Rate limit how often this thread checks the timer pools. */
if (CONFIG_TIMER_RUN_RATELIMIT_ROUNDS > 1) { @@ -984,6 +988,13 @@ odp_timer_pool_create(const char *name, __odp_errno = EINVAL; return ODP_TIMER_POOL_INVALID; } + + if (min_res_ns > param->res_ns) { + min_res_ns = param->res_ns; + time_per_ratelimit_period = + odp_time_global_from_ns(min_res_ns / 2); + } + return odp_timer_pool_new(name, param); }
@@ -1188,7 +1199,7 @@ int odp_timer_init_global(const odp_init_t *params) !params->not_used.feat.timer;
time_per_ratelimit_period = - odp_time_global_from_ns(CONFIG_TIMER_RUN_RATELIMIT_NS); + odp_time_global_from_ns(min_res_ns / 2);
if (!inline_timers) { timer_res_init();
commit 762372f299b64c8c30c3f5a0ba51fbb48e234e1e Merge: e420668c 65d0fbba Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Thu Aug 10 13:51:29 2017 +0300
Merge branch 'master' into api-next
-----------------------------------------------------------------------
Summary of changes: example/generator/odp_generator.c | 165 +++++++++++++-------- platform/linux-generic/include/odp_pool_internal.h | 1 + .../linux-generic/include/odp_timer_internal.h | 3 - platform/linux-generic/odp_pool.c | 19 +++ platform/linux-generic/odp_timer.c | 13 +- platform/linux-generic/pktio/dpdk.c | 53 ++++--- 6 files changed, 163 insertions(+), 91 deletions(-)
hooks/post-receive