From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 1/3] timer: add per-installer pending lists for each lcore Date: Tue, 29 Aug 2017 08:11:12 -0700 Message-ID: <20170829081112.57b693a3@xeon-e3> References: <1503499644-29432-1-git-send-email-erik.g.carrillo@intel.com> <1503499644-29432-2-git-send-email-erik.g.carrillo@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: rsanford@akamai.com, dev@dpdk.org To: Gabriel Carrillo Return-path: Received: from mail-pg0-f50.google.com (mail-pg0-f50.google.com [74.125.83.50]) by dpdk.org (Postfix) with ESMTP id B3DE32BAC for ; Tue, 29 Aug 2017 17:11:15 +0200 (CEST) Received: by mail-pg0-f50.google.com with SMTP id y15so11693823pgc.1 for ; Tue, 29 Aug 2017 08:11:15 -0700 (PDT) In-Reply-To: <1503499644-29432-2-git-send-email-erik.g.carrillo@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, 23 Aug 2017 09:47:22 -0500 Gabriel Carrillo 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.