From 2fc54306eefda21d658bdb998ba53d99871429eb Mon Sep 17 00:00:00 2001 From: Haodong Tang Date: Fri, 30 Jun 2017 14:27:34 +0800 Subject: [PATCH] os/bluestore/KernelDevice: make the amount of reaped aio tunable Signed-off-by: Haodong Tang --- src/common/config_opts.h | 1 + src/os/bluestore/KernelDevice.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 73ea6b30dcd..6aa697e3c6d 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -1053,6 +1053,7 @@ OPTION(bdev_inject_crash_flush_delay, OPT_INT, 2) // wait N more seconds on flus OPTION(bdev_aio, OPT_BOOL, true) OPTION(bdev_aio_poll_ms, OPT_INT, 250) // milliseconds OPTION(bdev_aio_max_queue_depth, OPT_INT, 1024) +OPTION(bdev_aio_reap_max, OPT_INT, 16) OPTION(bdev_block_size, OPT_INT, 4096) OPTION(bdev_debug_aio, OPT_BOOL, false) OPTION(bdev_debug_aio_suicide_timeout, OPT_FLOAT, 60.0) diff --git a/src/os/bluestore/KernelDevice.cc b/src/os/bluestore/KernelDevice.cc index 032e2136253..2de595ea072 100644 --- a/src/os/bluestore/KernelDevice.cc +++ b/src/os/bluestore/KernelDevice.cc @@ -340,7 +340,7 @@ void KernelDevice::_aio_thread() int inject_crash_count = 0; while (!aio_stop) { dout(40) << __func__ << " polling" << dendl; - int max = 16; + int max = cct->_conf->bdev_aio_reap_max; aio_t *aio[max]; int r = aio_queue.get_next_completed(cct->_conf->bdev_aio_poll_ms, aio, max); -- 2.39.5