From c04699204c1514ffcf4a4fc66a23f9cd657648b7 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Sat, 6 Jul 2024 14:04:03 +0300 Subject: [PATCH] reactor: Set aio_nowait_supported once This variable is global and _not_ thread_local, so there's no need in setting it in each reactor's .configure() invocation. Signed-off-by: Pavel Emelyanov --- src/core/reactor.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/reactor.cc b/src/core/reactor.cc index 20127608f9e..c2b323ab669 100644 --- a/src/core/reactor.cc +++ b/src/core/reactor.cc @@ -1578,8 +1578,6 @@ void reactor::configure(const reactor_options& opts) { csdc.stall_detector_reports_per_minute = opts.blocked_reactor_reports_per_minute.get_value(); csdc.oneline = opts.blocked_reactor_report_format_oneline.get_value(); _cpu_stall_detector->update_config(csdc); - - aio_nowait_supported = opts.linux_aio_nowait.get_value(); } pollable_fd @@ -4401,6 +4399,7 @@ void smp::configure(const smp_options& smp_opts, const reactor_options& reactor_ .no_poll_aio = !reactor_opts.poll_aio.get_value() || (reactor_opts.poll_aio.defaulted() && reactor_opts.overprovisioned), }; + aio_nowait_supported = reactor_opts.linux_aio_nowait.get_value(); std::mutex mtx; #ifdef SEASTAR_HEAPPROF