Recent changes

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

 



The following changes since commit c2509cd7fa44c043099ad58bcb3b3f789a5a014b:

  Fio 1.43-rc1 (2010-08-15 15:02:10 -0400)

are available in the git repository at:
  git://git.kernel.dk/fio.git master

David Nellans (1):
      Add option to skip delays when replaying traces

Jens Axboe (1):
      Fix blktrace replay

 HOWTO       |    7 +++++++
 blktrace.c  |   12 ++++++++++--
 file.h      |    1 +
 filesetup.c |   13 +++++++++++++
 fio.1       |    8 +++++++-
 fio.h       |    1 +
 log.c       |    1 -
 options.c   |    7 +++++++
 8 files changed, 46 insertions(+), 4 deletions(-)

---

Diff of recent changes:

diff --git a/HOWTO b/HOWTO
index 0ef7ca4..2bbaad0 100644
--- a/HOWTO
+++ b/HOWTO
@@ -986,6 +986,13 @@ read_iolog=str	Open an iolog with the specified file name and replay the
 		for how to capture such logging data. For blktrace replay,
 		the file needs to be turned into a blkparse binary data
 		file first (blkparse <device> -o /dev/null -d file_for_fio.bin).
+		
+replay_no_stall=int When replaying I/O with read_iolog the default behavior
+		is to attempt to respect the time stamps within the log and replay
+        them with the appropriate delay between IOPS.  By setting this variable
+        fio will not respect the timestamps and attempt to replay them as fast
+        as possible while still respecting ordering.  The result is the same
+        I/O pattern to a given device, but different timings.
 
 write_bw_log=str If given, write a bandwidth log of the jobs in this job
 		file. Can be used to store data of the bandwidth of the
diff --git a/blktrace.c b/blktrace.c
index ef3e18f..6cf8d46 100644
--- a/blktrace.c
+++ b/blktrace.c
@@ -187,7 +187,7 @@ static void trace_add_file(struct thread_data *td, __u32 device)
 		int fileno;
 
 		dprint(FD_BLKTRACE, "add devices %s\n", dev);
-		fileno = add_file(td, dev);
+		fileno = add_file_exclusive(td, dev);
 		trace_add_open_event(td, fileno);
 	}
 }
@@ -341,8 +341,16 @@ int load_blktrace(struct thread_data *td, const char *filename)
 				delay = t.time - ttime;
 			if ((t.action & BLK_TC_ACT(BLK_TC_WRITE)) && read_only)
 				skipped_writes++;
-			else
+			else {
+				/*
+				 * set delay to zero if no_stall enabled for
+				 * fast replay
+				 */
+				if (td->o.no_stall)
+					delay = 0;
+
 				handle_trace(td, &t, delay, ios, rw_bs);
+			}
 
 			ttime = t.time;
 			cpu = t.cpu;
diff --git a/file.h b/file.h
index 3b4ed0b..6349465 100644
--- a/file.h
+++ b/file.h
@@ -140,6 +140,7 @@ extern int __must_check generic_close_file(struct thread_data *, struct fio_file
 extern int __must_check generic_get_file_size(struct thread_data *, struct fio_file *);
 extern int __must_check pre_read_files(struct thread_data *);
 extern int add_file(struct thread_data *, const char *);
+extern int add_file_exclusive(struct thread_data *, const char *);
 extern void get_file(struct fio_file *);
 extern int __must_check put_file(struct thread_data *, struct fio_file *);
 extern void put_file_log(struct thread_data *, struct fio_file *);
diff --git a/filesetup.c b/filesetup.c
index d2b74d7..5a8105a 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -963,6 +963,19 @@ int add_file(struct thread_data *td, const char *fname)
 	return cur_files;
 }
 
+int add_file_exclusive(struct thread_data *td, const char *fname)
+{
+	struct fio_file *f;
+	unsigned int i;
+
+	for_each_file(td, f, i) {
+		if (!strcmp(f->file_name, fname))
+			return i;
+	}
+
+	return add_file(td, fname);
+}
+
 void get_file(struct fio_file *f)
 {
 	dprint(FD_FILE, "get file %s, ref=%d\n", f->file_name, f->references);
diff --git a/fio.1 b/fio.1
index c5c10af..1c0dc79 100644
--- a/fio.1
+++ b/fio.1
@@ -740,6 +740,12 @@ Write the issued I/O patterns to the specified file.
 Replay the I/O patterns contained in the specified file generated by
 \fBwrite_iolog\fR, or may be a \fBblktrace\fR binary file.
 .TP
+.BI replay_no_stall \fR=\fPint
+While replaying I/O patterns using \fBread_iolog\fR the default behavior
+attempts to respect timing information between I/Os.  Enabling
+\fBreplay_no_stall\fR causes I/Os to be replayed as fast as possible while
+still respecting ordering.
+.TP
 .B write_bw_log \fR=\fPstr
 If given, write a bandwidth log of the jobs in this job file. Can be used to
 store data of the bandwidth of the jobs in their lifetime. The included
@@ -747,7 +753,7 @@ fio_generate_plots script uses gnuplot to turn these text files into nice
 graphs. See \fBwrite_log_log\fR for behaviour of given filename. For this
 option, the postfix is _bw.log.
 .TP
-.B write_lat_log
+.B write_lat_log \fR=\fPstr
 Same as \fBwrite_bw_log\fR, but writes I/O completion latencies.  If no
 filename is given with this option, the default filename of "jobname_type.log"
 is used. Even if the filename is given, fio will still append the type of log.
diff --git a/fio.h b/fio.h
index 5788107..ad47762 100644
--- a/fio.h
+++ b/fio.h
@@ -254,6 +254,7 @@ struct thread_options {
 	unsigned int gtod_cpu;
 	unsigned int gtod_offload;
 	enum fio_cs clocksource;
+	unsigned int no_stall;
 
 	char *read_iolog_file;
 	char *write_iolog_file;
diff --git a/log.c b/log.c
index 80d3742..4a64132 100644
--- a/log.c
+++ b/log.c
@@ -131,7 +131,6 @@ int read_iolog_get(struct thread_data *td, struct io_u *io_u)
 			io_u->buflen = ipo->len;
 			io_u->file = td->files[ipo->fileno];
 			get_file(io_u->file);
-
 			dprint(FD_IO, "iolog: get %llu/%lu/%s\n", io_u->offset,
 						io_u->buflen, io_u->file->file_name);
 			if (ipo->delay) iolog_delay(td, ipo->delay);
diff --git a/options.c b/options.c
index 7a9d5d3..82a7289 100644
--- a/options.c
+++ b/options.c
@@ -1482,6 +1482,13 @@ static struct fio_option options[FIO_MAX_OPTS] = {
 		.help	= "Playback IO pattern from file",
 	},
 	{
+		.name	= "replay_no_stall",
+		.type	= FIO_OPT_INT,
+		.off1	= td_var_offset(no_stall),
+		.def	= "0",
+		.help	= "Playback IO pattern file as fast as possible without stalls",
+	},
+	{
 		.name	= "exec_prerun",
 		.type	= FIO_OPT_STR_STORE,
 		.off1	= td_var_offset(exec_prerun),
--
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