On Wed, 23 Aug 2017 09:47:22 -0500
Gabriel Carrillo <erik.g.carri...@intel.com> wrote:

>       __TIMER_STAT_ADD(manage, 1);
> -     /* optimize for the case where per-cpu list is empty */
> -     if (priv_timer[lcore_id].pending_head.sl_next[0] == NULL)
> -             return;
> -     cur_time = rte_get_timer_cycles();
> +     for (i = 0, installer_lcore = enabled_lcores[i]; i < n_enabled_lcores;
> +          installer_lcore = enabled_lcores[++i]) {
> +             list = &priv_tim->pending_lists[installer_lcore];
> +
> +             /* optimize for the case where list is empty */
> +             if (list->head.sl_next[0] == NULL)
> +                     continue;
> +             cur_time = rte_get_timer_cycles();

This code is critical. We expect applications using timers to call timer_manage
very often and the case of no timers present, and no timer due must consume as
few cycles as possible

This change will add significant performance delays to these applications.

Reply via email to