From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 909E4968 for ; Tue, 19 Sep 2017 19:00:25 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2017 10:00:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,418,1500966000"; d="scan'208";a="901901672" Received: from wcpqa1.an.intel.com ([10.123.72.207]) by FMSMGA003.fm.intel.com with ESMTP; 19 Sep 2017 10:00:22 -0700 From: Erik Gabriel Carrillo To: rsanford@akamai.com Cc: dev@dpdk.org, john.mcnamara@intel.com Date: Tue, 19 Sep 2017 12:02:25 -0500 Message-Id: <1505840548-77004-1-git-send-email-erik.g.carrillo@intel.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1505340308-86141-1-git-send-email-erik.g.carrillo@intel.com> References: <1505340308-86141-1-git-send-email-erik.g.carrillo@intel.com> Subject: [dpdk-dev] [PATCH v4 0/3] timer library enhancement 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, 19 Sep 2017 17:00:26 -0000 In the current implementation of the DPDK timer library, timers can be created and set to be handled by a target lcore by adding it to a skiplist that corresponds to that lcore. However, if an application enables multiple lcores, and each of these lcores repeatedly attempts to install timers on the same target lcore, overall application throughput will be reduced as all lcores contend to acquire the lock guarding the single skiplist of pending timers. This patchset addresses this scenario by adding an option to enable an array of skiplists in each lcore's priv_timer struct. Then, when lcore i installs a timer on lcore k, the timer will be added to the ith skiplist for lcore k. If lcore j installs a timer on lcore k simultaneously, lcores i and j can both proceed since they will be acquiring different locks for different lists. This functionality is off by default, and can be enabled via a new function. When lcore k processes its pending timers, if the multiple pending list option is enabled, it will traverse skiplists in its array and acquire the current skiplist's lock while a run list is broken out; meanwhile, all other lists can continue to be modified. Then, all run lists for lcore k are collected and traversed together so timers are executed in their relative order. If the multiple pending list option is not enabled (the default), only a single list will be traversed, as before. Erik Gabriel Carrillo (3): timer: add multiple pending lists option for each lcore timer: handle timers installed from non-EAL threads doc: update timer lib docs doc/guides/prog_guide/timer_lib.rst | 31 +-- doc/guides/rel_notes/release_17_11.rst | 7 + lib/librte_timer/rte_timer.c | 384 ++++++++++++++++++++++----------- lib/librte_timer/rte_timer.h | 29 ++- lib/librte_timer/rte_timer_version.map | 6 + 5 files changed, 321 insertions(+), 136 deletions(-) -- 2.6.4