]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: avoid duplicated searches during allocating free extents
authorJianjian Huo <samuel.huo@gmail.com>
Mon, 14 Mar 2016 05:12:50 +0000 (22:12 -0700)
committerJianjian Huo <samuel.huo@gmail.com>
Thu, 17 Mar 2016 06:09:28 +0000 (23:09 -0700)
commitd571be230590971faa421b3d29deefa6820a00da
treecff04a842ecb6243635ecb2d898e504cc8026f09
parent599d4eaaaf9533f84eff3012fe100a99afa790a7
os/bluestore: avoid duplicated searches during allocating free extents

When StupidAllocator searches for free extents, if hint is not 0(most times),
it will search extents starting from hint and up in each applicable bin,
if not found, then search all extents in those bins again.

If the extent to find(>= needs) exists below hint and is not in the choose_bin(),
let's say it's in the bin_X; then during this twice searches, all extents from
hint and up in bins before bin_X will be searched twice. This patch will eliminate
those unnecessary searches.

Signed-off-by: Jianjian Huo <samuel.huo@gmail.com>
src/os/bluestore/StupidAllocator.cc