From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBCCFC38A2D for ; Wed, 15 Apr 2020 14:42:58 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 5B94C208E4 for ; Wed, 15 Apr 2020 14:42:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=monjalon.net header.i=@monjalon.net header.b="H+fiNAkD"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="eCDr7xgV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B94C208E4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monjalon.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7F29E1C1F7; Wed, 15 Apr 2020 16:42:57 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id E1B131C1E5 for ; Wed, 15 Apr 2020 16:42:56 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 7612F5C01BF; Wed, 15 Apr 2020 10:42:56 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 15 Apr 2020 10:42:56 -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=9u+LfJLafgzkVir27PT390fYrp4BZysb24PON+8OQNg=; b=H+fiNAkDACvj 83hRR1txIez5+FY85cu0uvceGIX7Ljt7E1MXklztPxMQdWC7j2dzax8wfj5sVVFA NVjOoPBoFdG8XO06NFkLUYXyaMVYT0ONvB3tZn6CDnC0b3TPzKZx20DA3tzqNtnT sScRAwj4/4ISfSJCUIzaTA3+ICPs6GY= 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=9u+LfJLafgzkVir27PT390fYrp4BZysb24PON+8OQ Ng=; b=eCDr7xgVmXFuaiuBFvLE0V7HpEBp6o3ad952M+fTNeTSTWN5iO9dipSoi 2spispoDEeuG06Lf1AFZEKRKKmDB+KE7II68Jtt3QB0jV9SPEf3n8rEdvOLu0ikD CGj6/P6TxcXsrcGFGmADyrTugNWv+cL8mKdBmNQ4i8uMfN+8B63K5oGQocZTHfS/ IZGAH1tr++uruNZu4zZMmmL4hyBFzt1yAP/1HKr1UJqAmfNC/ZmH6rAquscahF5K MxYVPm1Qgvlyedgi4s62/HUbN9WyAFH98LM+tsMGEVX4x/xiyX52Gmq0fMQgHJmA ZKnzfWE4DrXOnvIa2TS2M801B0/sw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrfeefgdeilecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth 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 07D923060061; Wed, 15 Apr 2020 10:42:54 -0400 (EDT) From: Thomas Monjalon To: Suanming Mou Cc: "dev@dpdk.org" , "amo@semihalf.com" , Cristian Dumitrescu Date: Wed, 15 Apr 2020 16:42:52 +0200 Message-ID: <3431556.3Lj2Plt8kZ@thomas> In-Reply-To: References: <1583828479-204084-1-git-send-email-suanmingm@mellanox.com> <20200415141529.2057898-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4] bitmap: add init 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" 15/04/2020 16:22, Suanming Mou: > Hi Thomas, > > Thanks for the update. > > From: Thomas Monjalon > > > > From: 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. > > > > Signed-off-by: Suanming Mou > > Acked-by: Cristian Dumitrescu > Reviewed-by: Suanming Mou > > --- > > > > v4: > > - add experimental tags and comments > > - move functions near original init function > > - squash test patch > > - use "init" word in title > > > > v3 updates: > > 1. Implement individual rte_bitmap_init_with_all_set() function. > > 2. Add new function to clear the overhead bits. > > > > v2 updates: > > 1. Split the common part to __rte_bitmap_init(). > > 2. Set the slab bits more customized. Applied, thanks