aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include/odp_timer_internal.h
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2018-11-13 16:11:17 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-11-16 21:58:12 +0300
commit56f0435d26ad16fdb4c8b6ea874cf88b15a5ddf9 (patch)
tree04843ece291c667b19bc2443882c27e5b7936f90 /platform/linux-generic/include/odp_timer_internal.h
parent12c4ca508b07b8d2366b0c37bee5f866019e94c2 (diff)
linux-gen: timer: decrease inline timer polling interval under load
Decrease inline timer polling interval after receiving events to compansate for event processing delay. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic/include/odp_timer_internal.h')
-rw-r--r--platform/linux-generic/include/odp_timer_internal.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/platform/linux-generic/include/odp_timer_internal.h b/platform/linux-generic/include/odp_timer_internal.h
index 1f612448e..cd80778a5 100644
--- a/platform/linux-generic/include/odp_timer_internal.h
+++ b/platform/linux-generic/include/odp_timer_internal.h
@@ -36,12 +36,14 @@ typedef struct {
odp_timer_t timer;
} odp_timeout_hdr_t;
-unsigned _timer_run(void);
+/* A larger decrement value should be used after receiving events compared to
+ * an 'empty' call. */
+unsigned int _timer_run(int dec);
/* Static inline wrapper to minimize modification of schedulers. */
-static inline unsigned timer_run(void)
+static inline unsigned int timer_run(int dec)
{
- return odp_global_rw->inline_timers ? _timer_run() : 0;
+ return odp_global_rw->inline_timers ? _timer_run(dec) : 0;
}
#endif