From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 0E2B21E35 for ; Wed, 2 May 2018 18:28:06 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 67E5C22800; Wed, 2 May 2018 12:28:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 02 May 2018 12:28:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=hjXCTKZUasrs237eRQgNwCJDCD oybYYJYHBdRNbZe78=; b=EXmDylY0YoPyrOEfhGtESMRAfrl7GqtCdGUzJ0S+wj PIXJabbJlpoZZLKi7SyQHFce1O7yMnCwsyq2HuDwKoX3hfCFYVOtPPSqbknQ3xEY Ur4v/hPN6luk+nLUUyF2XBzefKybgVnXprgMSWgl3634w3nZfTT/7UxOmAMEKSO0 g= 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-sender:x-me-sender:x-sasl-enc; s=fm2; bh=hjXCTK ZUasrs237eRQgNwCJDCDoybYYJYHBdRNbZe78=; b=gvqUZJ4MmoWs6p8lKG6Eco MVQaobuz9fO3+X8mU9Fi4PCoURkklHax8vyZX+/NoqBmMw5MpbvItQKmbI6k8seE XXWNxyP/j6o4dtvv6nyCsZs8VU/8v5A3x8VCinbTW9pbAuSy6Bu9Q2Trd+Qugqw2 nEl36dQghzniimr5b7vtWQatbTDqfO0PJR9KSKIZdFg9qJV2bdS/SdUV8Opkq7pk Y41riOhPMjRHWEXaC/p5abHT5M4Y4GsSap2aCdQ0jwOjV+pdCEdo9qZeoBg3bPBt mzLySp/LEv9FxSdcPcupLGbGYZ7AJJszt6Z/0XsH8syUiCPvFbconBwxhJH92uOA == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 79DC3E4412; Wed, 2 May 2018 12:28:04 -0400 (EDT) From: Thomas Monjalon To: Anatoly Burakov Cc: dev@dpdk.org, shahafs@mellanox.com, olgas@mellanox.com, rasland@mellanox.com Date: Wed, 02 May 2018 18:28:03 +0200 Message-ID: <2387384.z8u5O1jZH9@xps> In-Reply-To: <454d2b8eea6615a20e496fa924cc04feda9bb686.1525274971.git.anatoly.burakov@intel.com> References: <454d2b8eea6615a20e496fa924cc04feda9bb686.1525274971.git.anatoly.burakov@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 2/2] malloc: avoid padding elements on page deallocation 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: Wed, 02 May 2018 16:28:06 -0000 02/05/2018 17:38, Anatoly Burakov: > Currently, when deallocating pages, malloc will fixup other > elements' headers if there is not enough space to store a full > element in leftover space. This leads to race conditions because > there are some functions that check for pad size with an unlocked > heap, expecting pad size to be constant. > > Fix it by being more conservative and only freeing pages when > there is enough space before and after the page to store a free > element. > > Fixes: 1403f87d4fb8 ("malloc: enable memory hotplug support") > Cc: anatoly.burakov@intel.com > > Signed-off-by: Anatoly Burakov Series applied, thanks. (typo fixed and added uppercase at beginning of sentences)