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 A8A31100F for ; Tue, 29 Aug 2017 18:14:19 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Aug 2017 09:14:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,445,1498546800"; d="scan'208";a="1212026345" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 29 Aug 2017 09:14:18 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 29 Aug 2017 09:14:18 -0700 Received: from fmsmsx117.amr.corp.intel.com ([169.254.3.51]) by FMSMSX157.amr.corp.intel.com ([169.254.14.168]) with mapi id 14.03.0319.002; Tue, 29 Aug 2017 09:13:12 -0700 From: "Carrillo, Erik G" To: "Ananyev, Konstantin" , "rsanford@akamai.com" CC: "dev@dpdk.org" , Stephen Hemminger Thread-Topic: [dpdk-dev] [PATCH v2 1/3] timer: add per-installer pending lists for each lcore Thread-Index: AQHTHeCJYdNhon/mB06f670O/VZcw6KbpMmA///fXnA= Date: Tue, 29 Aug 2017 16:13:10 +0000 Message-ID: References: <1503499644-29432-2-git-send-email-erik.g.carrillo@intel.com> <1503692823-16214-1-git-send-email-erik.g.carrillo@intel.com> <2601191342CEEE43887BDE71AB9772584F23D8BE@IRSMSX103.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB9772584F23D8BE@IRSMSX103.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTE4YTQ4M2YtMWQwZC00ZGI0LTlkZmEtMWMxYzY3NDczZGI4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjlNQXRoRlwvN1FZbU9xd0xLcUZ6a3hzcUNsZXlUNUNaN3Q5czh4c3U1WWxjPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.108] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 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 16:14:20 -0000 Hi Konstantin, > -----Original Message----- > From: Ananyev, Konstantin > Sent: Tuesday, August 29, 2017 5:57 AM > To: Carrillo, Erik G ; rsanford@akamai.com > Cc: dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v2 1/3] timer: add per-installer pending l= ists > for each lcore >=20 > Hi Gabriel, >=20 > > > > Instead of each priv_timer struct containing a single skiplist, this > > commit adds a skiplist for each enabled lcore to priv_timer. In the > > case that multiple lcores repeatedly install timers on the same target > > lcore, this change reduces lock contention for the target lcore's > > skiplists and increases performance. >=20 > I am not an rte_timer expert, but there is one thing that worries me: > It seems that complexity of timer_manage() has increased with that patch > quite a bit: > now it has to check/process up to RTE_MAX_LCORE skiplists instead of one= , > also it has to somehow to properly sort up to RTE_MAX_LCORE lists of > retrieved (ready to run) timers. > Wouldn't all that affect it's running time? >=20 Yes, it would indeed increase it. > I understand your intention to reduce lock contention, but I suppose at l= east > it could be done in a configurable way. > Let say allow user to specify dimension of pending_lists[] at init phase= or so. > Then timer from lcore_id=3DN will endup in > pending_lists[N%RTE_DIM(pendilng_list)]. >=20 This is a neat idea, and seemingly would allow the original performance to = be maintained for applications where contention is not an issue. I'll loo= k into this change, as it may address other developers' concerns as well - = thanks for the suggestion. > Another thought - might be better to divide pending timers list not by cl= ient > (lcore) id, but by expiration time - some analog of timer wheel or so. > That, I think might greatly decrease the probability that timer_manage() = and > timer_add() will try to access the same list. > From other side timer_manage() still would have to consume skip-lists one > by one. > Though I suppose that's quite radical change from what we have right now. > Konstantin >=20 Thanks, Gabriel