For workloads that need to handle tons of small objects,
the space of "slow" could become extremely fragmented,
which makes it is hard to transmit free space between
bluestore and bluefs.
Hard cap alloc size at 1GB at per request, so there is
1024 small allocations at most. Hence we don't block
write ops for long.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
int64_t alloc_len;
do {
// hard cap to fit into 32 bits
- gift = std::min<uint64_t>(size, 1ull << 31);
+ gift = std::min<uint64_t>(size, 1ull << 30);
dout(10) << __func__ << " gifting " << gift
<< " (" << byte_u_t(gift) << ")" << dendl;
auto reclaim = p2roundup(uint64_t(-delta), alloc_size);
// hard cap to fit into 32 bits
- reclaim = std::min<uint64_t>(reclaim, 1ull << 31);
+ reclaim = std::min<uint64_t>(reclaim, 1ull << 30);
dout(10) << __func__ << " reclaiming " << reclaim
<< " (" << byte_u_t(reclaim) << ")" << dendl;