Commit 4bca1a78 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix XtraDB LPBug #714143 :

Windows native async io is disabled.

The patch uses completion ports for asynchronous IO notification , 
instead of formerly  used notification via event . This also removes
the limit of 64 async IOs per background IO thread (this limit was 
forced  by using WaitForMultipleObjects in previous AIO implementation)
parent 824ce5f3
...@@ -59,7 +59,7 @@ IF (MSVC_VERSION GREATER 1400) ...@@ -59,7 +59,7 @@ IF (MSVC_VERSION GREATER 1400)
ENDIF() ENDIF()
SET(CMAKE_INSTALL_PREFIX "C:/MariaDB${MYSQL_BASE_VERSION}") SET(CMAKE_INSTALL_PREFIX "C:/MariaDB${MYSQL_BASE_VERSION}" CACHE PATH "Default installation directory")
SET(INSTALL_ROOT "${CMAKE_INSTALL_PREFIX}") SET(INSTALL_ROOT "${CMAKE_INSTALL_PREFIX}")
# Set standard options # Set standard options
ADD_DEFINITIONS(-DHAVE_YASSL) ADD_DEFINITIONS(-DHAVE_YASSL)
......
...@@ -10916,12 +10916,12 @@ static MYSQL_SYSVAR_LONG(file_io_threads, innobase_file_io_threads, ...@@ -10916,12 +10916,12 @@ static MYSQL_SYSVAR_LONG(file_io_threads, innobase_file_io_threads,
static MYSQL_SYSVAR_ULONG(read_io_threads, innobase_read_io_threads, static MYSQL_SYSVAR_ULONG(read_io_threads, innobase_read_io_threads,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Number of background read I/O threads in InnoDB.", "Number of background read I/O threads in InnoDB.",
NULL, NULL, 4, 1, 64, 0); NULL, NULL, IF_WIN(1,4), 1, 64, 0);
static MYSQL_SYSVAR_ULONG(write_io_threads, innobase_write_io_threads, static MYSQL_SYSVAR_ULONG(write_io_threads, innobase_write_io_threads,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Number of background write I/O threads in InnoDB.", "Number of background write I/O threads in InnoDB.",
NULL, NULL, 4, 1, 64, 0); NULL, NULL, IF_WIN(1,4), 1, 64, 0);
static MYSQL_SYSVAR_LONG(force_recovery, innobase_force_recovery, static MYSQL_SYSVAR_LONG(force_recovery, innobase_force_recovery,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
......
...@@ -152,8 +152,8 @@ log. */ ...@@ -152,8 +152,8 @@ log. */
#define OS_FILE_LOG 256 /* This can be ORed to type */ #define OS_FILE_LOG 256 /* This can be ORed to type */
/* @} */ /* @} */
#define OS_AIO_N_PENDING_IOS_PER_THREAD 32 /*!< Win NT does not allow more #define OS_AIO_N_PENDING_IOS_PER_THREAD 256 /*!< Windows might be able to handle
than 64 */ more */
/** Modes for aio operations @{ */ /** Modes for aio operations @{ */
#define OS_AIO_NORMAL 21 /*!< Normal asynchronous i/o not for ibuf #define OS_AIO_NORMAL 21 /*!< Normal asynchronous i/o not for ibuf
......
This diff is collapsed.
...@@ -1274,13 +1274,7 @@ innobase_start_or_create_for_mysql(void) ...@@ -1274,13 +1274,7 @@ innobase_start_or_create_for_mysql(void)
break; break;
default: default:
/* On Win 2000 and XP use async i/o */ /* On Win 2000 and XP use async i/o */
//os_aio_use_native_aio = TRUE; os_aio_use_native_aio = TRUE;
os_aio_use_native_aio = FALSE;
fprintf(stderr,
"InnoDB: Windows native async i/o is disabled as default.\n"
"InnoDB: It is not applicable for the current"
" multi io threads implementation.\n");
break;
} }
#endif #endif
if (srv_file_flush_method_str == NULL) { if (srv_file_flush_method_str == NULL) {
...@@ -1320,11 +1314,6 @@ innobase_start_or_create_for_mysql(void) ...@@ -1320,11 +1314,6 @@ innobase_start_or_create_for_mysql(void)
"async_unbuffered")) { "async_unbuffered")) {
srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED; srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED;
os_aio_use_native_aio = TRUE; os_aio_use_native_aio = TRUE;
srv_n_read_io_threads = srv_n_write_io_threads = 1;
fprintf(stderr,
"InnoDB: 'async_unbuffered' was detected as innodb_flush_method.\n"
"InnoDB: Windows native async i/o is enabled.\n"
"InnoDB: And io threads are restricted.\n");
#endif #endif
} else { } else {
fprintf(stderr, fprintf(stderr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment