summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2020-11-25 10:59:10 +0100
committerVladislav Vaintroub <wlad@mariadb.com>2020-11-25 13:07:08 +0100
commit78df9e37a65bfdd32ec721a9152d5c94cbe89217 (patch)
tree5d66035e462c1ceeec5b2208f1a6822f484e3549 /storage
parent3dfeae0e221c7ced19372383df5eef1bafc7fe6e (diff)
downloadmariadb-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 'storage')
-rw-r--r--storage/innobase/buf/buf0buf.cc2
-rw-r--r--storage/innobase/include/os0file.h3
-rw-r--r--storage/innobase/os/os0file.cc4
3 files changed, 6 insertions, 3 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index f3ad84a4853..2ddd9f278b1 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -1467,7 +1467,7 @@ bool buf_pool_t::create()
ut_d(lru_scan_itr.m_mutex= &mutex);
io_buf.create((srv_n_read_io_threads + srv_n_write_io_threads) *
- tpool::aio::N_PENDING);
+ OS_AIO_N_PENDING_IOS_PER_THREAD);
/* FIXME: remove some of these variables */
srv_buf_pool_curr_size= curr_pool_size;
diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h
index d01a15c28ed..b723ba009a3 100644
--- a/storage/innobase/include/os0file.h
+++ b/storage/innobase/include/os0file.h
@@ -264,6 +264,9 @@ struct os_file_size_t {
os_offset_t m_alloc_size;
};
+/** Win NT does not allow more than 64 */
+static const ulint OS_AIO_N_PENDING_IOS_PER_THREAD = 256;
+
extern ulint os_n_file_reads;
extern ulint os_n_file_writes;
extern ulint os_n_fsyncs;
diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc
index 6e8aacbe799..ee7f09ec17f 100644
--- a/storage/innobase/os/os0file.cc
+++ b/storage/innobase/os/os0file.cc
@@ -4027,8 +4027,8 @@ static bool is_linux_native_aio_supported()
bool os_aio_init(ulint n_reader_threads, ulint n_writer_threads, ulint)
{
- int max_write_events= int(n_writer_threads * tpool::aio::N_PENDING);
- int max_read_events= int(n_reader_threads * tpool::aio::N_PENDING);
+ int max_write_events= int(n_writer_threads * OS_AIO_N_PENDING_IOS_PER_THREAD);
+ int max_read_events= int(n_reader_threads * OS_AIO_N_PENDING_IOS_PER_THREAD);
int max_events = max_read_events + max_write_events;
int ret;