DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] bitmap: add create bitmap with all bits set
@ 2020-03-10  8:21 Suanming Mou
  2020-03-10  8:21 ` [dpdk-dev] [PATCH 1/2] " Suanming Mou
                   ` (5 more replies)
  0 siblings, 6 replies; 24+ messages in thread
From: Suanming Mou @ 2020-03-10  8:21 UTC (permalink / raw)
  To: cristian.dumitrescu; +Cc: dev

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(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2020-04-15 14:42 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10  8:21 [dpdk-dev] [PATCH 0/2] bitmap: add create bitmap with all bits set Suanming Mou
2020-03-10  8:21 ` [dpdk-dev] [PATCH 1/2] " Suanming Mou
2020-04-03 14:49   ` Andrzej Ostruszka
2020-04-07  6:19     ` Suanming Mou
2020-04-07 15:00       ` Suanming Mou
2020-04-07 17:48   ` Dumitrescu, Cristian
2020-04-08  2:57     ` Suanming Mou
2020-03-10  8:21 ` [dpdk-dev] [PATCH 2/2] test/bitmap: add bitmap create with all bits set case Suanming Mou
2020-03-25 13:25 ` [dpdk-dev] [PATCH 0/2] bitmap: add create bitmap with all bits set Thomas Monjalon
2020-04-02 13:44   ` Suanming Mou
2020-04-08  3:05 ` [dpdk-dev] [PATCH v2 " Suanming Mou
2020-04-08  3:05   ` [dpdk-dev] [PATCH v2 1/2] " Suanming Mou
2020-04-09 14:16     ` Dumitrescu, Cristian
2020-04-10 10:34       ` Suanming Mou
2020-04-10 11:21         ` Dumitrescu, Cristian
2020-04-10 12:30           ` Suanming Mou
2020-04-08  3:05   ` [dpdk-dev] [PATCH v2 2/2] test/bitmap: add bitmap create with all bits set case Suanming Mou
2020-04-10 12:46 ` [dpdk-dev] [PATCH v3 0/2] bitmap: add create bitmap with all bits set Suanming Mou
2020-04-10 12:46   ` [dpdk-dev] [PATCH v3 1/2] " Suanming Mou
2020-04-10 16:04     ` Dumitrescu, Cristian
2020-04-10 12:46   ` [dpdk-dev] [PATCH v3 2/2] test/bitmap: add bitmap create with all bits set case Suanming Mou
2020-04-15 14:15 ` [dpdk-dev] [PATCH v4] bitmap: add init with all bits set Thomas Monjalon
2020-04-15 14:22   ` Suanming Mou
2020-04-15 14:42     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).