Recent changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following changes since commit 4b0c257cd785cf7af4a4722f41bd45174283f69d:

  Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio (2011-07-06 20:13:27 +0200)

are available in the git repository at:

  git://git.kernel.dk/fio.git master

Jens Axboe (3):
      Fix ramp time bug
      Fix ramp time random screwup
      Ensure that we honor aio_read/write() returning EAGAIN

 engines/posixaio.c |    7 +++++++
 fio.c              |   31 +++++++++++++++++++++----------
 2 files changed, 28 insertions(+), 10 deletions(-)

---

Diff of recent changes:

diff --git a/engines/posixaio.c b/engines/posixaio.c
index 061812e..867b5f7 100644
--- a/engines/posixaio.c
+++ b/engines/posixaio.c
@@ -184,6 +184,13 @@ static int fio_posixaio_queue(struct thread_data *td,
 	}
 		
 	if (ret) {
+		/*
+		 * At least OSX has a very low limit on the number of pending
+		 * IOs, so if it will return EAGAIN.
+		 */
+		if (errno == EAGAIN)
+			return FIO_Q_BUSY;
+
 		io_u->error = errno;
 		td_verror(td, io_u->error, "xfer");
 		return FIO_Q_COMPLETED;
diff --git a/fio.c b/fio.c
index 2beda81..48c728e 100644
--- a/fio.c
+++ b/fio.c
@@ -372,10 +372,15 @@ requeue:
 	return 0;
 }
 
+static inline void __update_tv_cache(struct thread_data *td)
+{
+	fio_gettime(&td->tv_cache, NULL);
+}
+
 static inline void update_tv_cache(struct thread_data *td)
 {
 	if ((++td->tv_cache_nr & td->tv_cache_mask) == td->tv_cache_mask)
-		fio_gettime(&td->tv_cache, NULL);
+		__update_tv_cache(td);
 }
 
 static int break_on_this_error(struct thread_data *td, int *retptr)
@@ -461,8 +466,11 @@ static void do_verify(struct thread_data *td)
 		update_tv_cache(td);
 
 		if (runtime_exceeded(td, &td->tv_cache)) {
-			td->terminate = 1;
-			break;
+			__update_tv_cache(td);
+			if (runtime_exceeded(td, &td->tv_cache)) {
+				td->terminate = 1;
+				break;
+			}
 		}
 
 		io_u = __get_io_u(td);
@@ -607,8 +615,11 @@ static void do_io(struct thread_data *td)
 		update_tv_cache(td);
 
 		if (runtime_exceeded(td, &td->tv_cache)) {
-			td->terminate = 1;
-			break;
+			__update_tv_cache(td);
+			if (runtime_exceeded(td, &td->tv_cache)) {
+				td->terminate = 1;
+				break;
+			}
 		}
 
 		io_u = get_io_u(td);
@@ -967,11 +978,6 @@ static void reset_io_counters(struct thread_data *td)
 	 */
 	if (td->o.time_based || td->o.loops)
 		td->nr_done_files = 0;
-
-	/*
-	 * Set the same seed to get repeatable runs
-	 */
-	td_fill_rand_seeds(td);
 }
 
 void reset_all_stats(struct thread_data *td)
@@ -1005,6 +1011,11 @@ static void clear_io_state(struct thread_data *td)
 	close_files(td);
 	for_each_file(td, f, i)
 		fio_file_clear_done(f);
+
+	/*
+	 * Set the same seed to get repeatable runs
+	 */
+	td_fill_rand_seeds(td);
 }
 
 static int exec_string(const char *string)
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux