mirror of
https://github.com/MariaDB/server.git
synced 2025-11-27 05:41:41 +03:00
Remove os_aio_simulated_put_read_threads_to_sleep()
According to the code, it was Windows specific "simulated AIO" workaround. The simulated s not supported on Windows anymore. Thus, remove the dead code
This commit is contained in:
@@ -703,12 +703,6 @@ buf_read_ahead_linear(const page_id_t page_id, ulint zip_size, bool ibuf)
|
||||
|
||||
ulint ibuf_mode = ibuf ? BUF_READ_IBUF_PAGES_ONLY : BUF_READ_ANY_PAGE;
|
||||
|
||||
/* Since Windows XP seems to schedule the i/o handler thread
|
||||
very eagerly, and consequently it does not wait for the
|
||||
full read batch to be posted, we use special heuristics here */
|
||||
|
||||
os_aio_simulated_put_read_threads_to_sleep();
|
||||
|
||||
for (i = low; i < high; i++) {
|
||||
/* It is only sensible to do read-ahead in the non-sync
|
||||
aio mode: hence FALSE as the first parameter */
|
||||
|
||||
@@ -1442,17 +1442,6 @@ os_aio_wait_until_no_pending_writes();
|
||||
void
|
||||
os_aio_simulated_wake_handler_threads();
|
||||
|
||||
#ifdef _WIN32
|
||||
/** This function can be called if one wants to post a batch of reads and
|
||||
prefers an i/o-handler thread to handle them all at once later. You must
|
||||
call os_aio_simulated_wake_handler_threads later to ensure the threads
|
||||
are not left sleeping! */
|
||||
void
|
||||
os_aio_simulated_put_read_threads_to_sleep();
|
||||
#else /* _WIN32 */
|
||||
# define os_aio_simulated_put_read_threads_to_sleep()
|
||||
#endif /* _WIN32 */
|
||||
|
||||
/** This is the generic AIO handler interface function.
|
||||
Waits for an aio operation to complete. This function is used to wait the
|
||||
for completed requests. The AIO array of pending requests is divided
|
||||
|
||||
@@ -4693,48 +4693,6 @@ os_file_set_eof(
|
||||
return(SetEndOfFile(h));
|
||||
}
|
||||
|
||||
/** This function can be called if one wants to post a batch of reads and
|
||||
prefers an i/o-handler thread to handle them all at once later. You must
|
||||
call os_aio_simulated_wake_handler_threads later to ensure the threads
|
||||
are not left sleeping! */
|
||||
void
|
||||
os_aio_simulated_put_read_threads_to_sleep()
|
||||
{
|
||||
AIO::simulated_put_read_threads_to_sleep();
|
||||
}
|
||||
|
||||
/** This function can be called if one wants to post a batch of reads and
|
||||
prefers an i/o-handler thread to handle them all at once later. You must
|
||||
call os_aio_simulated_wake_handler_threads later to ensure the threads
|
||||
are not left sleeping! */
|
||||
void
|
||||
AIO::simulated_put_read_threads_to_sleep()
|
||||
{
|
||||
/* The idea of putting background IO threads to sleep is only for
|
||||
Windows when using simulated AIO. Windows XP seems to schedule
|
||||
background threads too eagerly to allow for coalescing during
|
||||
readahead requests. */
|
||||
|
||||
if (srv_use_native_aio) {
|
||||
/* We do not use simulated AIO: do nothing */
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
os_aio_recommend_sleep_for_read_threads = true;
|
||||
|
||||
for (ulint i = 0; i < os_aio_n_segments; i++) {
|
||||
AIO* array;
|
||||
|
||||
get_array_and_local_segment(&array, i);
|
||||
|
||||
if (array == s_reads) {
|
||||
|
||||
os_event_reset(os_aio_segment_wait_events[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !_WIN32*/
|
||||
|
||||
/** Does a syncronous read or write depending upon the type specified
|
||||
|
||||
Reference in New Issue
Block a user