#
16daee89 |
| 29-Aug-2024 |
Yankun Li <845245370@qq.com> |
lib/reduce: Add cache that holds chunks and blocks
Selecting an available chunk or backing block from the bit array (such as allocated_chunk_maps or allocated_backing_io_units) always starts from th
lib/reduce: Add cache that holds chunks and blocks
Selecting an available chunk or backing block from the bit array (such as allocated_chunk_maps or allocated_backing_io_units) always starts from the beginning. This is inefficient, especially with large disk spaces, leading to high CPU consumption and degraded I/O performance.
This patch introduces free_chunks_queue and free_backing_blocks_queue queues, which temporarily cache reclaimed chunks and backing blocks. If the cache is empty, look for a free chunk or backing block starting from find_chunk/block_offset in the bit array instead of starting from 0.
Change-Id: Ie4c892122063cb4b5d649e13880fbafe34ec2c3d Signed-off-by: Yankun Li <845245370@qq.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24745 Reviewed-by: Jim Harris <jim.harris@samsung.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
show more ...
|