]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: remove unneeded indirection in BitMapZone. 13743/head
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Wed, 1 Mar 2017 15:54:39 +0000 (16:54 +0100)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Thu, 2 Mar 2017 23:20:29 +0000 (00:20 +0100)
commitaaad3facdaac4f025e00807d02f8fbaf5ce869a9
treea92766fbee1331895240d5a923923f820dd032ca
parentf321309c9c892c4c213ee5f1fc8cdd559387fefb
os/bluestore: remove unneeded indirection in BitMapZone.

BitMapZone aggregates BmapEntries through a pointer to independently-
allocated std::vector which in turn has its own pointer to the real
data. This indirection is unnecessary as std::vector is pretty cheap
in the terms of memory overhead. For instance, on x86-64 & GCC 5.4.0
sizeof(std::vector) == 24, which translates to 3 raw pointers.

Stripping the indirection could have positive impact on processor's
caches and allow to minimize the number of memory accesses.

Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/os/bluestore/BitAllocator.cc
src/os/bluestore/BitAllocator.h