From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from prod-mail-xrelay07.akamai.com (prod-mail-xrelay07.akamai.com [23.79.238.175]) by dpdk.org (Postfix) with ESMTP id 5A96A4AAD for ; Mon, 25 Jul 2016 14:29:25 +0200 (CEST) Received: from prod-mail-xrelay07.akamai.com (localhost.localdomain [127.0.0.1]) by postfix.imss70 (Postfix) with ESMTP id C07E2433429; Mon, 25 Jul 2016 12:29:24 +0000 (GMT) Received: from prod-mail-relay11.akamai.com (prod-mail-relay11.akamai.com [172.27.118.250]) by prod-mail-xrelay07.akamai.com (Postfix) with ESMTP id A47D6433427; Mon, 25 Jul 2016 12:29:24 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; s=a1; t=1469449764; bh=ndsHvrV3x/455wim8gA/sg6Wo09U5dklJ4xsH+J0IME=; l=1421; h=From:To:CC:Date:References:In-Reply-To:From; b=TWf00luuIiCNN9KdlmbTinpzMW2PKm0YzmxWu9M6ZPSEsch10HX2g3K8TCwzJ3aN1 AVw5kLohfOIE0LPn+VIHN1cqQBCsrSiGKgTvTiOLumlGGQqH22QdjAGK3V8tlx0YzN +jU3L//oEtfdUTfMTdo7vie//1KWxe61T6A43KOA= Received: from email.msg.corp.akamai.com (ustx2ex-cas4.msg.corp.akamai.com [172.27.25.33]) by prod-mail-relay11.akamai.com (Postfix) with ESMTP id 8ADB41FC88; Mon, 25 Jul 2016 12:29:24 +0000 (GMT) Received: from ustx2ex-dag1mb6.msg.corp.akamai.com (172.27.27.107) by ustx2ex-dag1mb1.msg.corp.akamai.com (172.27.27.101) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Mon, 25 Jul 2016 07:29:23 -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; Mon, 25 Jul 2016 05:29:23 -0700 From: "Sanford, Robert" To: Thomas Monjalon , Hiroyuki Mikita CC: "dev@dpdk.org" Thread-Topic: [PATCH] timer: fix break list when timer_cb reset running timer Thread-Index: AQHR4FYxMj0lLRaoX0OkvdpVwjjOZKAlPmoAgAD0lICAAx74AA== Date: Mon, 25 Jul 2016 12:29:23 +0000 Message-ID: References: <1468778880-25515-1-git-send-email-h.mikita89@gmail.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.4.3.140616 x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.19.133.12] Content-Type: text/plain; charset="us-ascii" Content-ID: <420FFB751C97CF4BB832C37CC3B02A7F@akamai.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] timer: fix break list when timer_cb reset running timer 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: , X-List-Received-Date: Mon, 25 Jul 2016 12:29:25 -0000 On 7/23/16 4:49 AM, "Thomas Monjalon" wrote: >2016-07-23 0:14 GMT+02:00 Sanford, Robert : >> Acked-by: Robert Sanford >> >> I tested the three timer patches with app/test timer_autotest and >> timer_racecond_autotest, and additional private tests. > >Thanks Robert. >Are you confident enough to integrate them in the last days of 16.07? >How critical are they? >Should we make a RC5 for them? Yes, I'm confident that the patches are safe and correct. However, I'm not sure that we should make a RC just for them. Patch 1 fixes a problem where we incorrectly lower the depth of the skip list, resulting in performance that does not live up to O(log n) that we expect. Summary: performance degradation with large number of timers. Patch 2 fixes a minor inefficiency when timer_manage() races with timer_stop() or timer_reset(). Patch 3 fixes the most serious problem: We may corrupt timer list links if multiple timers expire at roughly the same time, and one of those timers' callback tries to stop/reset other(s) that are scheduled to run in the same call to timer_manage(). Question for Hiroyuki: How did you discover timer linked-list corruption? By code inspection, or do you have a real application that needs that functionality (timers stop/reset each other at roughly the same time)? Regards, Robert