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 0BAC4A058B; Wed, 25 Mar 2020 14:25:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 315462BCE; Wed, 25 Mar 2020 14:25:42 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id D29303B5 for ; Wed, 25 Mar 2020 14:25:39 +0100 (CET) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 59AD65C02C1; Wed, 25 Mar 2020 09:25:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 25 Mar 2020 09:25:39 -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=q4ZOA/Inw1xu3/vKuWQ3gVhPBNAMC1UGqQXZG1N5Yaw=; b=PJjv3YIXHs7u BxtdN2ccrMWzN96mfZkkgT3rxaok6g4LJmyQBWdCvFxMmGwiMj27N96qkFNlRvbJ WUBIMiIhetYpp939U011cviOROnEykC4sqx71E+EcX+pXPhE7ipeqnepriChhho/ B1YIkbHZ2cm10TnQjnZi7WvPDVtaJJI= 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=fm2; bh=q4ZOA/Inw1xu3/vKuWQ3gVhPBNAMC1UGqQXZG1N5Y aw=; b=ffNaTL1Ia6vzBmJHmwb/1FMxvnhI+9F1qKS4N1Fu66lZqpC/ba8CT3W2e cVr31L3NG+5KenmxHHmZvmhFiJMMtftyICKX3u1IvzKR4yUvp5OfZgDb8UVyCcs4 YB1leZUtK1s0LWI72689bUNx7YZ/Lpvnp92Jy2GIrxPrOrewDH354+uiJHYTdoNH d8cVgyl1Z8t6YqWQJmtttPKHHJPimP7aEAt8DKrCotzH3R93DlIEmC/X5ldL7Yki eRKRSlzxH5jEpo66tbztBf3rgRFTHzDWlju1N8D9aBCDbLM906mCqdFMtq6u0nbi epXmUCb7V6rkn/Kok8fHr08ucG9dQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudehgedgvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght 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 19A7630661A7; Wed, 25 Mar 2020 09:25:37 -0400 (EDT) From: Thomas Monjalon To: cristian.dumitrescu@intel.com Cc: dev@dpdk.org, Suanming Mou Date: Wed, 25 Mar 2020 14:25:35 +0100 Message-ID: <2212820.yKrmzQ4Hd0@xps> In-Reply-To: <1583828479-204084-1-git-send-email-suanmingm@mellanox.com> References: <1583828479-204084-1-git-send-email-suanmingm@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 0/2] bitmap: add create bitmap with all bits set 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" Call for review, please. 10/03/2020 09:21, Suanming Mou: > Currently, in the case to use bitmap as resource allocator, after > bitmap creation, all the bitmap bits should be set to indicate the > bit available. Every time when allocate one bit, search for the set > bits and clear it to make it in use. > > Add a new rte_bitmap_init_with_all_set() function to have a quick > fill up the bitmap bits. > > Comparing with the case create the bitmap as empty and set the bitmap > one by one, the new function costs less cycles. > > For bitmap with 1000 bits, create the bitmap with all bits set costs 754 > cycles, while set one by one costs 14194. CPU info as below: > Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz > > Suanming Mou (2): > bitmap: add create bitmap with all bits set > test/bitmap: add bitmap create with all bits set case > > app/test/test_bitmap.c | 57 +++++++++++++++++++++++++++++- > lib/librte_eal/common/include/rte_bitmap.h | 32 +++++++++++++++++ > 2 files changed, 88 insertions(+), 1 deletion(-) > >