From: Suraj Shirvankar <[email protected]>
Signed-off-by: Suraj Shirvankar <[email protected]>
---
util/fdmon-io_uring.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/util/fdmon-io_uring.c b/util/fdmon-io_uring.c
index b0d68bdc44..235837abcb 100644
--- a/util/fdmon-io_uring.c
+++ b/util/fdmon-io_uring.c
@@ -324,8 +324,14 @@ static const FDMonOps fdmon_io_uring_ops = {
bool fdmon_io_uring_setup(AioContext *ctx)
{
int ret;
+ unsigned int flags = 0;
- ret = io_uring_queue_init(FDMON_IO_URING_ENTRIES, &ctx->fdmon_io_uring, 0);
+ /* This improves performance but can be skipped on old hosts */
+#ifdef IORING_SETUP_SINGLE_ISSUER
+ flags |= IORING_SETUP_SINGLE_ISSUER
+#endif
+
+ ret = io_uring_queue_init(FDMON_IO_URING_ENTRIES, &ctx->fdmon_io_uring,
flags);
if (ret != 0) {
return false;
}
--
2.45.3