Commit c1e84276 authored by unknown's avatar unknown

os0file.c:

  Add more precise diagnostics about the state of the I/O threads of InnoDB; print in SHOW INNODB STATUS if the event wait semaphore of each I/O thread is set


innobase/os/os0file.c:
  Add more precise diagnostics about the state of the I/O threads of InnoDB; print in SHOW INNODB STATUS if the event wait semaphore of each I/O thread is set
parent 4468792d
...@@ -2588,6 +2588,8 @@ restart: ...@@ -2588,6 +2588,8 @@ restart:
/* NOTE! We only access constant fields in os_aio_array. Therefore /* NOTE! We only access constant fields in os_aio_array. Therefore
we do not have to acquire the protecting mutex yet */ we do not have to acquire the protecting mutex yet */
srv_set_io_thread_op_info(global_segment,
"looking for i/o requests (a)");
ut_ad(os_aio_validate()); ut_ad(os_aio_validate());
ut_ad(segment < array->n_segments); ut_ad(segment < array->n_segments);
...@@ -2606,6 +2608,9 @@ restart: ...@@ -2606,6 +2608,9 @@ restart:
os_mutex_enter(array->mutex); os_mutex_enter(array->mutex);
srv_set_io_thread_op_info(global_segment,
"looking for i/o requests (b)");
/* Check if there is a slot for which the i/o has already been /* Check if there is a slot for which the i/o has already been
done */ done */
...@@ -2718,6 +2723,8 @@ consecutive_loop: ...@@ -2718,6 +2723,8 @@ consecutive_loop:
} }
} }
srv_set_io_thread_op_info(global_segment, "consecutive i/o requests");
/* We have now collected n_consecutive i/o requests in the array; /* We have now collected n_consecutive i/o requests in the array;
allocate a single buffer which can hold all data, and perform the allocate a single buffer which can hold all data, and perform the
i/o */ i/o */
...@@ -2861,6 +2868,8 @@ slot_io_done: ...@@ -2861,6 +2868,8 @@ slot_io_done:
return(ret); return(ret);
wait_for_io: wait_for_io:
srv_set_io_thread_op_info(global_segment, "resetting wait event");
/* We wait here until there again can be i/os in the segment /* We wait here until there again can be i/os in the segment
of this thread */ of this thread */
...@@ -2952,9 +2961,15 @@ os_aio_print( ...@@ -2952,9 +2961,15 @@ os_aio_print(
ulint i; ulint i;
for (i = 0; i < srv_n_file_io_threads; i++) { for (i = 0; i < srv_n_file_io_threads; i++) {
fprintf(file, "I/O thread %lu state: %s (%s)\n", i, fprintf(file, "I/O thread %lu state: %s (%s)", i,
srv_io_thread_op_info[i], srv_io_thread_op_info[i],
srv_io_thread_function[i]); srv_io_thread_function[i]);
if (os_aio_segment_wait_events[i]->is_set) {
fprintf(file, " ev set");
}
fprintf(file, "\n");
} }
fputs("Pending normal aio reads:", file); fputs("Pending normal aio reads:", file);
......
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