Flexible I/O Tester development
 help / color / mirror / Atom feed
* [PATCH] Document that write_iolog is unsafe for concurrent jobs
@ 2011-01-06 11:13 Stefan Hajnoczi
  2011-01-08 19:26 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hajnoczi @ 2011-01-06 11:13 UTC (permalink / raw)
  To: fio; +Cc: Stefan Hajnoczi

The write_iolog parameter should not be used in the global section since
each job will independently write to the same file.  The output will be
interspersed and the file will be corrupt.

Document that each job should write to its own iolog file.  This will
save users time when trying out the iolog feature for the first time.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
I considered adding code to check for:
1. Multiple jobs
2. write_iolog defined in the global section

But it seems options.c isn't geared towards detecting this case.  Instead of
adding a hack somewhere later in the code path I decided to document the
limitation on interspersed write_iolog.

 HOWTO  |    3 ++-
 README |    4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/HOWTO b/HOWTO
index dc21afc..7c94329 100644
--- a/HOWTO
+++ b/HOWTO
@@ -988,7 +988,8 @@ zoneskip=int	Skip the specified number of bytes when zonesize data has
 		io on zones of a file.
 
 write_iolog=str	Write the issued io patterns to the specified file. See
-		read_iolog.
+		read_iolog.  Specify a separate file for each job, otherwise
+		the iologs will be interspersed and the file may be corrupt.
 
 read_iolog=str	Open an iolog with the specified file name and replay the
 		io patterns it contains. This can be used to store a
diff --git a/README b/README
index 0f91c66..de06fb1 100644
--- a/README
+++ b/README
@@ -274,7 +274,9 @@ The job file parameters are:
 			and length entries being in bytes.
 	write_iolog=x	Write an iolog to file 'x' in the same format as iolog.
 			The iolog options are exclusive, if both given the
-			read iolog will be performed.
+			read iolog will be performed.  Specify a separate file
+			for each job, otherwise the iologs will be interspersed
+			and the file may be corrupt.
 	write_bw_log	Write a bandwidth log.
 	write_lat_log	Write a latency log.
 	lockmem=x	Lock down x amount of memory on the machine, to
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Document that write_iolog is unsafe for concurrent jobs
  2011-01-06 11:13 [PATCH] Document that write_iolog is unsafe for concurrent jobs Stefan Hajnoczi
@ 2011-01-08 19:26 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2011-01-08 19:26 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: fio

On 2011-01-06 12:13, Stefan Hajnoczi wrote:
> The write_iolog parameter should not be used in the global section since
> each job will independently write to the same file.  The output will be
> interspersed and the file will be corrupt.
> 
> Document that each job should write to its own iolog file.  This will
> save users time when trying out the iolog feature for the first time.

Thanks, I added this and also updated the man page.


-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-08 19:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-06 11:13 [PATCH] Document that write_iolog is unsafe for concurrent jobs Stefan Hajnoczi
2011-01-08 19:26 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox