From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v6 0/3] Improve zero-length memzone allocation Date: Fri, 13 Jul 2018 11:24:35 +0200 Message-ID: <2021190.DoeUY8PiQe@xps> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Anatoly Burakov 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) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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