From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0VhgntAXOwQMKoprw92KJwASRhGw/cYM4nsqX+x4pVs=; b=XmL1gZkYLZxPQKe29nPgy4UmzMuSPVvkyyNfgbJ+9RJb0HzI+8KdfojaZ8m/uK3V55 ZlWlf/J5Ut/p9iD2SSt0ttRme5VfGeebjCs2JCL16t0C8U/PBe1EqNKQC0jEW2Zg7dd8 eymRt4X/IIX6+ww/ksqyREaIpB5IjlJSMtnoVt5b4JRmv23Ske/D1FXqC0QD6jkcrbfg 7QXXzYTfNiO8AwBXu/UVD7x6qOdMGdSxgx6PeUy71HWYa1hKZGRGXXw3k9mU4AtbjWs5 JhDhAASYK/Hqrc/rZtH5t0+IiQ+X8xawT0VvwJduNhF8BgPXKIFNXlV0ptPaQvINVoVU bThA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0VhgntAXOwQMKoprw92KJwASRhGw/cYM4nsqX+x4pVs=; b=nn+cMynIGqB9qA378ymeosdJuEYdt6K5nOBoOWAGRoABldMLTZCMOt5uGIvsTfH3FE Do/pWT+2YpHhbJuB0ATpkA/cRgV8gVVzIS9MbOaxlvJPe+Qjcu2ENuLiHdoCXhF1fr1b +8SNudeDpjCfXNqFxXPRr8nWS1WNFi1UcMGu2apMDqKl6JXLLWG+0VNrWvG06KyR6Db5 JhaKSM9uXgBAf5gb6BKF9J2JadO8Bm6weMFlsbhzOrSeX19KE1j0ggaOj9WmDc312tLb 7MGcHoAf7yQ8fDBG+gVjubtovXGeA0ZQ9a4qfnzvM/7BT3jWHPeS2YSf1uEijkhY3Lj+ HIYA== X-Gm-Message-State: AHYfb5hV4HNe39AItAOf/JtSyf+J/WARRiksPKpQKtsw2K5CnSNKv/3W kdLsCkdweUQELCeP X-Received: by 10.84.217.137 with SMTP id p9mr834910pli.404.1504019474710; Tue, 29 Aug 2017 08:11:14 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id d25sm5821888pfb.2.2017.08.29.08.11.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Aug 2017 08:11:14 -0700 (PDT) Date: Tue, 29 Aug 2017 08:11:12 -0700 From: Stephen Hemminger To: Gabriel Carrillo Cc: rsanford@akamai.com, dev@dpdk.org Message-ID: <20170829081112.57b693a3@xeon-e3> In-Reply-To: <1503499644-29432-2-git-send-email-erik.g.carrillo@intel.com> 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 Subject: Re: [dpdk-dev] [PATCH 1/3] timer: add per-installer pending lists for each lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Aug 2017 15:11:16 -0000 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.