From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by dpdk.org (Postfix) with ESMTP id BA1815A44 for ; Fri, 13 Jul 2018 11:24:39 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 63CB2315; Fri, 13 Jul 2018 05:24:38 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 13 Jul 2018 05:24:38 -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=v4Ygb51u4jkSRz3qCU/k8SE2pt qEuBNCSrc5fQKqGJ4=; b=ISNh2paCGHt0bglbRUsLWIImL65sriEoa/dLTOa22T sfGSyBmtDzUeUiuzO7wLnERs1REi//uu/0Lbmq1a4LxnZtECSHyNJXzblAEIAH7z grmZ1hn/Hecj1Lw4inCcjx140eZhf+yaAa7+UHR/em7lpf2LOrOBitEyNglLh+o8 M= 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=fm3; bh=v4Ygb5 1u4jkSRz3qCU/k8SE2ptqEuBNCSrc5fQKqGJ4=; b=ssviagqfwKXifOsVHaJMTu WQufMz79fu/qoUG+WY8QTrGfZhjJipLNQZof/PuGHeh7JUxDEPIUzaiJ9vPJ7xbq mUt99sNq8Xtsx1Wvms1SGajbSFjxkLMJntEtk+ECBWqOt9Ecl2ZrsSTK7xkaDWbs kZABkyrG0xkLgCjOSArsRx7EXAi+/fN+dMZP00nVPWUUJ8ktiohDVWBE2mUPekAz ZVOVGGfb3/PQiLJWE8O/2gj/0eEgrNUBrJl6KFkJs09nGINQrcE0d3SxhPjGd/Ok YC7iHPD9zRyIELBpnKGXrh3Dn/qy3L3G1CGF5bHX01m5HmZOG0kY9nfdiu5N4/+g == X-ME-Proxy: 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 267821025C; Fri, 13 Jul 2018 05:24:37 -0400 (EDT) From: Thomas Monjalon To: Anatoly Burakov Cc: dev@dpdk.org Date: Fri, 13 Jul 2018 11:24:35 +0200 Message-ID: <2021190.DoeUY8PiQe@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 v6 0/3] Improve zero-length memzone allocation 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: Fri, 13 Jul 2018 09:24:40 -0000 31/05/2018 11:50, Anatoly Burakov: > This patchset does two things. First, it enables reserving > memzones of zero-length that are IOVA-contiguous. Second, > it fixes a long-standing race condition in reserving > zero-length memzones, where malloc heap is not locked between > stats collection and reservation, and will instead allocate > biggest element on the spot. > > Some limitations are added, but they are a trade-off between > not having race conditions and user convenience. It would be > possible to lock all heaps during memzone reserve for zero- > length, and that would keep the old behavior, but given how > such allocation (especially when asking for IOVA-contiguous > memory) may take a long time, a design decision was made to > keep things simple, and only check other heaps if the > current one is completely busy. > > Ideas on improvement are welcome. > > Anatoly Burakov (3): > malloc: add finding biggest free IOVA-contiguous element > malloc: allow reserving biggest element > memzone: improve zero-length memzone reserve Applied, thanks