Commit c1e84276 authored by unknown's avatar unknown
Browse files

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
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -2588,6 +2588,8 @@ os_aio_simulated_handle(
	/* NOTE! We only access constant fields in os_aio_array. Therefore
	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(segment < array->n_segments);

@@ -2606,6 +2608,9 @@ os_aio_simulated_handle(
	
	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
	done */
	
@@ -2718,6 +2723,8 @@ os_aio_simulated_handle(
		}
	}

	srv_set_io_thread_op_info(global_segment, "consecutive i/o requests");

	/* We have now collected n_consecutive i/o requests in the array;
	allocate a single buffer which can hold all data, and perform the
	i/o */
@@ -2861,6 +2868,8 @@ os_aio_simulated_handle(
	return(ret);

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
	of this thread */
	
@@ -2952,9 +2961,15 @@ os_aio_print(
	ulint		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_function[i]);

        	if (os_aio_segment_wait_events[i]->is_set) {
			fprintf(file, " ev set");
		}
			
		fprintf(file, "\n");
	}

	fputs("Pending normal aio reads:", file);