diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2020-11-25 10:59:10 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2020-11-25 13:07:08 +0100 |
commit | 78df9e37a65bfdd32ec721a9152d5c94cbe89217 (patch) | |
tree | 5d66035e462c1ceeec5b2208f1a6822f484e3549 /tpool | |
parent | 3dfeae0e221c7ced19372383df5eef1bafc7fe6e (diff) | |
download | mariadb-git-78df9e37a65bfdd32ec721a9152d5c94cbe89217.tar.gz |
Partially Revert "MDEV-24270: Collect multiple completed events at a time"
This partially reverts commit 6479006e14691ff85072d06682f81b90875e9cb0.
Remove the constant tpool::aio::N_PENDING, which has no
intrinsic meaning for the tpool.
Diffstat (limited to 'tpool')
-rw-r--r-- | tpool/aio_linux.cc | 6 | ||||
-rw-r--r-- | tpool/tpool.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tpool/aio_linux.cc b/tpool/aio_linux.cc index cb967c117e4..03872df5ac7 100644 --- a/tpool/aio_linux.cc +++ b/tpool/aio_linux.cc @@ -51,6 +51,8 @@ namespace tpool { #ifdef LINUX_NATIVE_AIO +#define MAX_EVENTS 256 + class aio_linux final : public aio { thread_pool *m_pool; @@ -60,10 +62,10 @@ class aio_linux final : public aio static void getevent_thread_routine(aio_linux *aio) { - io_event events[N_PENDING]; + io_event events[MAX_EVENTS]; for (;;) { - switch (int ret= my_getevents(aio->m_io_ctx, 1, N_PENDING, events)) { + switch (int ret= my_getevents(aio->m_io_ctx, 1, MAX_EVENTS, events)) { case -EINTR: continue; case -EINVAL: diff --git a/tpool/tpool.h b/tpool/tpool.h index a2f9a9133cb..0d83af5bd74 100644 --- a/tpool/tpool.h +++ b/tpool/tpool.h @@ -155,8 +155,6 @@ struct aiocb class aio { public: - /** Maximum number of pending requests per thread */ - static constexpr unsigned N_PENDING= 256; /** Submit asyncronous IO. On completion, cb->m_callback is executed. |