From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C8C57A0487 for ; Sat, 6 Jul 2019 00:06:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3D9F21BE1D; Sat, 6 Jul 2019 00:06:32 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 580BB1BE1B for ; Sat, 6 Jul 2019 00:06:31 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D199D213CA; Fri, 5 Jul 2019 18:06:27 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 05 Jul 2019 18:06:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=YMC2uS8xMupqhKkffJljjpgnNERJgCisaBIfGx/di3c=; b=NGvSrOqi3yfc /yb4zbR9sRqab3tw9kkIZ/vppiKnbBAojL4Okl2S7DU0sGEwE8SKFWP5Ig7C/Oop pbTHSwZuNgkraxViwxqo0OnnR6hApRWvD3rxFQ8Pn/tWRmL1GDWCKmJc2cs/FtbM oUolI+8yzf5KFpaujTFq1ae2NmJy3lM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=YMC2uS8xMupqhKkffJljjpgnNERJgCisaBIfGx/di 3c=; b=Lz/zFF2cQ1aBe/wQAnTcUKqmJmuxkhXhr/utAK/hfdClHWYQ1RJwPEzG0 Pgk1r9sQJZ0wUCvfEb1oeHbGQRb58Lnkv7QHU2xxI8EsM4IGhiPgyEuHmpsja/KD 1Cm4m3iHqlY2eYoqSUCEeZlA82GY6rX6RxZdaXSgKt2keKCk2Tt+UsdLYeb314UZ rwAypgi8gMuW5LlDghWtsRfksYj1Y+Vrj81ZC0ez1quMkg/tg52lKycxn0v+ccu8 QGj+MJ+nqjLYoRr329C7/q+6G9/gW/u6nzENVkBlRJsiOqN/1qNiUHS78gSgzB7T exBbSBK2X0T1AqVgNWuGUTdrt8aNw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrfeehgddtiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucffoh hmrghinhepughpughkrdhorhhgnecukfhppeejjedrudefgedrvddtfedrudekgeenucfr rghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthenuc evlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 8AE83380076; Fri, 5 Jul 2019 18:06:26 -0400 (EDT) From: Thomas Monjalon To: Anatoly Burakov Cc: dev@dpdk.org, Robert Sanford , Erik Gabriel Carrillo Date: Sat, 06 Jul 2019 00:06:24 +0200 Message-ID: <3427711.pUUgotmRoR@xps> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3 1/1] timer: fix resource leak in finalize 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 05/07/2019 19:22, Anatoly Burakov: > Currently, whenever timer library is initialized, the memory > is leaked because there is no telling when primary or secondary > processes get to use the state, and there is no way to > initialize/deinitialize timer library state without race > conditions [1] because the data itself must live in shared memory. > > Add a spinlock to the shared mem config to have a way to > exclusively initialize/deinitialize the timer library without > any races, and implement the synchronization mechanism based > on this lock in the timer library. > > Also, update the API doc. Note that the behavior of the API > itself did not change - the requirement to call init in every > process was simply not documented explicitly. > > Fixes: c0749f7096c7 ("timer: allow management in shared memory") > > [1] See the following email thread: > https://mails.dpdk.org/archives/dev/2019-May/131498.html > > Signed-off-by: Erik Gabriel Carrillo > Signed-off-by: Anatoly Burakov > Acked-by: Erik Gabriel Carrillo > Reviewed-by: David Marchand Applied, thanks