From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id DC45311F5 for ; Mon, 29 Sep 2014 12:26:44 +0200 (CEST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by orsmga101.jf.intel.com with ESMTP; 29 Sep 2014 03:33:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,619,1406617200"; d="scan'208";a="480705275" Received: from bricha3-mobl.ger.corp.intel.com (HELO bricha3-mobl.ir.intel.com) ([10.243.20.21]) by azsmga001.ch.intel.com with SMTP; 29 Sep 2014 03:33:16 -0700 Received: by bricha3-mobl.ir.intel.com (sSMTP sendmail emulation); Mon, 29 Sep 2014 11:33:15 +0001 Date: Mon, 29 Sep 2014 11:33:15 +0100 From: Bruce Richardson To: "Wodkowski, PawelX" Message-ID: <20140929103315.GB12072@BRICHA3-MOBL> References: <20140926150156.GB5619@hmsreliant.think-freely.org> <2601191342CEEE43887BDE71AB9772582137D88E@IRSMSX104.ger.corp.intel.com> <20140926162134.GE5619@hmsreliant.think-freely.org> <2601191342CEEE43887BDE71AB9772582137D95F@IRSMSX104.ger.corp.intel.com> <20140926193905.GH5619@hmsreliant.think-freely.org> <2601191342CEEE43887BDE71AB9772582138410B@IRSMSX104.ger.corp.intel.com> <20140928204754.GC4012@localhost.localdomain> <2601191342CEEE43887BDE71AB977258213874C5@IRSMSX104.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.22 (2013-10-16) Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2] Change alarm cancel function to thread-safe: 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, 29 Sep 2014 10:26:45 -0000 On Mon, Sep 29, 2014 at 10:11:38AM +0000, Wodkowski, PawelX wrote: > > > > > > Image how you will be damned by someone that not even notice you change > > > and he Is managing some kind of resource based on returned number of > > > set/canceled timers. If you suddenly start returning negative values how those > > > application will behave? Silently changing returned value domain is evil in its > > > pure form. > > > > As I can see the impact is very limited. > > It is small impact to DPDK but can be huge to user application: This is why we traditionally have in the release-notes for each release a section dedicated to calling out changes from one release to another. [See http://dpdk.org/doc/intel/dpdk-release-notes-1.7.0.pdf section 5]. Since from release-to-release there are generally only a couple of changes - though our next release may be a little different - the actual changes are clear enough to read about without wading through pages of documentation. I thinking calling out the change in both the release notes and the API docs is sufficient even for a change like this. Basically, I wouldn't let API stability factor in too much in trying to get a proper fix for this issue. /Bruce > Ex: > If someone use this kind of expression in callback (skipping user app serialization part): > callback () { > ... > some_simple_semaphore += rte_alarm_cancel(...)); > ... > } > > Anywhere in the code: > ... > If (some_simple_semapore) { > some_simple_semapore --; > if (rte_eal_alarm_set(...) != 0) > some_simple_semapore ++; > } > ... > > 1. Do you notice the change in cancel function? > 2. How many hours you spend to find this issue in case of big app/system? > > > Only code that does check for (rte_alarm_cancel(...) == 0/ != 0) inside alarm > > callback function might be affected. > > From other side, indeed, there could exist situations, when the caller needs to > > know > > was the alarm successfully cancelled or not. > > And if not by what reason. > > > > I can extend API of rte alarms to add alarm state checking in next patch, but for > now, since this is not urgent I think original patch v2 should be enough. > > Pawel