From patchwork Tue Oct 4 20:51:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sanford, Robert" X-Patchwork-Id: 16377 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 9CA836A95; Tue, 4 Oct 2016 22:52:03 +0200 (CEST) Received: from prod-mail-xrelay06.akamai.com (prod-mail-xrelay06.akamai.com [96.6.114.98]) by dpdk.org (Postfix) with ESMTP id 1CC7B5A33 for ; Tue, 4 Oct 2016 22:52:02 +0200 (CEST) Received: from prod-mail-xrelay06.akamai.com (localhost.localdomain [127.0.0.1]) by postfix.imss70 (Postfix) with ESMTP id 6E0A4496C1F; Tue, 4 Oct 2016 20:52:01 +0000 (GMT) Received: from prod-mail-relay08.akamai.com (prod-mail-relay08.akamai.com [172.27.22.71]) by prod-mail-xrelay06.akamai.com (Postfix) with ESMTP id 4DFBF496C07; Tue, 4 Oct 2016 20:52:01 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; s=a1; t=1475614321; bh=B9vMVwBhyj1mVKW3ZYLu4afulEBik9LQQoTiDP0HlHk=; l=2940; h=From:To:Date:References:In-Reply-To:From; b=tmz7Eb+MxjxlJp/6dIVHZEnxAJYDNbu+myP5qz62ayWG7iejttXbbqTt/ncq3BG7Y tGQ3dCD4GUtjc06F+20uYbG3HEA2UYlHVbpahiYeuxVfuXASjLoqpnYEKwrEVTxYdz ExoQCMbT6ZuDF8+nyowTiRtozsdVlkjH7Imt2xic= Received: from email.msg.corp.akamai.com (ustx2ex-cas5.msg.corp.akamai.com [172.27.25.34]) by prod-mail-relay08.akamai.com (Postfix) with ESMTP id 4B0B398082; Tue, 4 Oct 2016 20:52:01 +0000 (GMT) Received: from ustx2ex-dag1mb6.msg.corp.akamai.com (172.27.27.107) by ustx2ex-dag1mb4.msg.corp.akamai.com (172.27.27.104) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Tue, 4 Oct 2016 15:52:00 -0500 Received: from ustx2ex-dag1mb6.msg.corp.akamai.com ([172.27.27.107]) by ustx2ex-dag1mb6.msg.corp.akamai.com ([172.27.27.107]) with mapi id 15.00.1178.000; Tue, 4 Oct 2016 13:52:00 -0700 From: "Sanford, Robert" To: Karmarkar Suyash , "dev@dpdk.org" , "thomas.monjalon@6wind.com" , "reshma.pattan@intel.com" Thread-Topic: [PATCH v2]:rte_timer:timer lag issue correction Thread-Index: AQHSEDPB2NrTgxc9oUadR+nlImJRw6CENQnwgAA/PYCADCZJ4IAIMEQQgABJXQA= Date: Tue, 4 Oct 2016 20:51:59 +0000 Message-ID: <67760434-4F5D-4F1E-9195-CFE3AFDB8030@akamai.com> References: <20160921205427.14116-1-skarmarkar@sonusnet.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/f.1a.0.160910 x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.19.43.29] Content-ID: <4A6A2916B5B38942A371AD821AA6DEEA@akamai.com> MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2]:rte_timer:timer lag issue correction X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Sorry, just saw this. I will take a look and get back shortly. -- Regards, Robert On 10/4/16, 3:31 PM, "Karmarkar Suyash" wrote: Hello Robert/Thomas, Can you please review the changes in V2 of the Patch and suggest next steps? Thanks Regards Suyash Karmarkar -----Original Message----- From: Karmarkar Suyash Sent: Thursday, September 29, 2016 10:27 AM To: dev@dpdk.org; thomas.monjalon@6wind.com; rsanford@akamai.com; reshma.pattan@intel.com Subject: RE: [PATCH v2]:rte_timer:timer lag issue correction Hello, Can you please review the changes and suggest next steps? Thanks Regards Suyash Karmarkar -----Original Message----- From: Karmarkar Suyash Sent: Wednesday, September 21, 2016 4:54 PM To: dev@dpdk.org; thomas.monjalon@6wind.com; rsanford@akamai.com; reshma.pattan@intel.com Cc: Karmarkar Suyash Subject: [PATCH v2]:rte_timer:timer lag issue correction For Periodic timers ,if the lag gets introduced, the current code added additional delay when the next peridoc timer was initialized by not taking into account the delay added, with this fix the code would start the next occurrence of timer keeping in account the lag added.Corrected the behavior. Fixes: 9b15ba89 ("timer: use a skip list") Karmarkar Suyash (1): Signed-off-by: Karmarkar Suyash lib/librte_timer/rte_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- lib/librte_timer/rte_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.3.windows.1 diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c index 43da836..18782fa 100644 --- a/lib/librte_timer/rte_timer.c +++ b/lib/librte_timer/rte_timer.c @@ -613,7 +613,7 @@ void rte_timer_manage(void) status.owner = (int16_t)lcore_id; rte_wmb(); tim->status.u32 = status.u32; - __rte_timer_reset(tim, cur_time + tim->period, + __rte_timer_reset(tim, tim->expire + tim->period, tim->period, lcore_id, tim->f, tim->arg, 1); rte_spinlock_unlock(&priv_timer[lcore_id].list_lock); }