From 7630498c51fd74ab1d803285564b6b27ffe93216 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 1 Jun 2021 19:14:33 +0800 Subject: [PATCH] os/bluestore/AvlAllocator: introduce bluestore_avl_alloc_ff_max_search_bytes so AvlAllocator can switch from the first-first mode to best-fit mode without walking through the whole space map tree. in the highly-fragmented system, iterating the whole tree could hurt the performance of fast storage system a lot. the idea comes from openzfs's metaslab allocator. Signed-off-by: Kefu Chai (cherry picked from commit 5a26875049d13130ffe5954428da0e1b9750359f) Signed-off-by: Mauricio Faria de Oliveira Conflicts: src/common/options/global.yaml.in: - Moved new option into src/common/options.cc --- src/common/options.cc | 4 ++++ src/os/bluestore/AvlAllocator.cc | 10 ++++++++++ src/os/bluestore/AvlAllocator.h | 6 ++++++ 3 files changed, 20 insertions(+) diff --git a/src/common/options.cc b/src/common/options.cc index e4fd613f7c22a..4fa13e1076b3e 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -4720,6 +4720,10 @@ std::vector