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 334FEA0562; Thu, 2 Apr 2020 15:44:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B37CC2BCE; Thu, 2 Apr 2020 15:44:18 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10042.outbound.protection.outlook.com [40.107.1.42]) by dpdk.org (Postfix) with ESMTP id 668ACFFA for ; Thu, 2 Apr 2020 15:44:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L7v05gHwUbXqZBA/WjVfDaQV2WyETXUuwHjEgDTmM2dqqHR8E/pJ2h9HGu6PIC/XVJeCQtjDlJ2pndYm0eRsLwiyMq/Q7+WeOoaLCEsaGnsQF++rFMdkRyxEK/SEDw006UzOZ6XA/QayM34HgO/sLf1ZAxfEVcSSEY2Ab7KiRh6MAxjQqUw93KS4Ms5WgWPNWfA+Aw1PbAKDev7IRAddCdWEmYb1Su5DY9T6fNmly60LuqcjHxPWdeLC5E0e5kDunckiIWRm6h+s0984rz3DZGQQDMFYbEd5aKjvyU3a66l2rD0X1MRhhOFiNoVZc3iPfScSHaoJf6e9x7eTrYKE/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kP0yoazNTpGkkriDb6nH3OdSlXCucUbcuHWI8uaueZ4=; b=AITvTEftEdPkFI3mZAwn/p4Xg2VEdzYY+eiRyiD7mPd02wubYInRa6MnAq7u0/C6x37U7wRl+9+Vqw4aybL45Rj2YCyZN7z1a/Bc1bUFzuuY34hco2+QkghAcqrvqzgqv+UI4sIE2ucTMQbr8fIgy/LuCcupX7+r00+s4Nc8gSl5SxiU15xjh0FJJqLKZPutwTTeKh24CmmFFwkd1b67/GeC8OyOLz8kvngpDrtWVI9+clbkADLDCjyrBUE5LyuNssX6d06KxQBzI1NXhSyfyIMoKAcdnEX3b1wGhJrR01t/6WY187g+dLhvfHXLH7D/00f1y2tRuHTWASOsNu3Wwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kP0yoazNTpGkkriDb6nH3OdSlXCucUbcuHWI8uaueZ4=; b=DFTR/Jv5z0tC7u3s7COP+gSonqyTMR4iWDzVgpqqTeSyH2zNFiorlOWfdC7ND9pbm7vxKO5JBWHzANxH+I3HFHoUNxotAEHT1qqclAsJsMhHaTvIAQ6NMeLjbhQJdJ6upa7tgjdZklUbagUniXj4prSmCu23OgS28G9XPYxX0AI= Received: from HE1PR05MB3484.eurprd05.prod.outlook.com (10.170.246.12) by HE1PR05MB3244.eurprd05.prod.outlook.com (10.170.243.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.20; Thu, 2 Apr 2020 13:44:10 +0000 Received: from HE1PR05MB3484.eurprd05.prod.outlook.com ([fe80::e44a:abcc:6e96:cb00]) by HE1PR05MB3484.eurprd05.prod.outlook.com ([fe80::e44a:abcc:6e96:cb00%7]) with mapi id 15.20.2856.019; Thu, 2 Apr 2020 13:44:09 +0000 From: Suanming Mou To: "cristian.dumitrescu@intel.com" CC: "dev@dpdk.org" , Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH 0/2] bitmap: add create bitmap with all bits set Thread-Index: AQHWAqjhlIjHlw5tDESM5u2GTJ8TDahl5CUw Date: Thu, 2 Apr 2020 13:44:09 +0000 Message-ID: References: <1583828479-204084-1-git-send-email-suanmingm@mellanox.com> <2212820.yKrmzQ4Hd0@xps> In-Reply-To: <2212820.yKrmzQ4Hd0@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=suanmingm@mellanox.com; x-originating-ip: [115.196.233.105] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 1bf1b267-a7fe-4598-0910-08d7d70bebf6 x-ms-traffictypediagnostic: HE1PR05MB3244: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 0361212EA8 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR05MB3484.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(136003)(376002)(346002)(396003)(39860400002)(366004)(6916009)(53546011)(66476007)(4326008)(86362001)(52536014)(66556008)(64756008)(55016002)(2906002)(54906003)(26005)(5660300002)(66446008)(9686003)(66946007)(6506007)(76116006)(186003)(33656002)(81166006)(478600001)(8936002)(81156014)(8676002)(71200400001)(316002)(7696005); DIR:OUT; SFP:1101; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: kUBDektGQrXtLKAcec5jgdW52OuhtrJ2/fE3mB9l2DJ9/1qfnNGUcOSBfEBHzi7L/4XQabEzuYZq1QyxvkXJxJwHEBqVqtcykzF9YDc2qJr7jXYhLZejUXU4MIT+QirySrTxyKAIX7iaNRXgxSJ2paUqFvaOQjkew5+zWxwtBEzIbgFDVNUc+OCGbLCA2B0POiuK3OfOI1MfMscnu6MCSDWLRo5yrn3mNnZlk/AOB51sbdB8mfKLkqfOdzAOeiANhQcwXgsx+XCh3aJZOfHCn6huTsAX0z+CsNxgduNdvp9eekRbUGEQiqNdq65Ibd1zDrsLyluTYYK7ivLbLxspgsATOrnuenn785VfRXqdJzKHg5LLYC+rfizmZatikdtxXphe7w9v/FcYXAS+kyQx4fgLBdw+pKhh5sQvQzZiLVcIINXmLxyFejdjhOkRwGbq x-ms-exchange-antispam-messagedata: SKPJpRixX7M12yWXDoiYpZUAOslGVkpFBM6qB286nWzp8OrlAkYhhrYVgojkD+fIc5qpoSPxt+c4TA44pK6QmyLScivxZkrr2xrMoVNoqrDFoEWdrWmIqqdS22g4m6hboisr9cacN2hINGVXBtzx6g== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1bf1b267-a7fe-4598-0910-08d7d70bebf6 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Apr 2020 13:44:09.7917 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ppZBr/zizrnVDjYjRBkYmK1hrpSQITM5dCJJAUO9Ef/hPUhdNd4BT+mlEdJFNf4MT2GzIlGs1xqvcXKZXT9vWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB3244 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" Ping > -----Original Message----- > From: Thomas Monjalon > Sent: Wednesday, March 25, 2020 9:26 PM > To: cristian.dumitrescu@intel.com > Cc: dev@dpdk.org; Suanming Mou > Subject: Re: [dpdk-dev] [PATCH 0/2] bitmap: add create bitmap with all bi= ts set >=20 > Call for review, please. >=20 >=20 > 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(-) > > > > >=20 >=20 >=20 >=20