The following changes since commit ba47f51ac3ab61b424e2d2406762d838ddb78b10: Add regression test for 82af2a7c (2012-03-13 13:55:38 +0100) are available in the git repository at: git://git.kernel.dk/fio.git master Dan Ehrenberg (1): New offset_increment option Jens Axboe (3): Fix offset_increment option and add man page entry for it Note offset_increment parent option Document compress_buffer_percentage, compress_buffer_chunk Yufei Ren (1): rdma engine graceful teardown HOWTO | 23 +++++++++++++++++++++++ engines/rdma.c | 3 ++- filesetup.c | 3 ++- fio.1 | 21 +++++++++++++++++++++ fio.h | 2 ++ ioengines.c | 11 +++++++++++ options.c | 8 ++++++++ 7 files changed, 69 insertions(+), 2 deletions(-) --- Diff of recent changes: diff --git a/HOWTO b/HOWTO index 0a3351c..e4614ea 100644 --- a/HOWTO +++ b/HOWTO @@ -488,6 +488,22 @@ scramble_buffers=bool If refill_buffers is too costly and the target is block compression attempts, but it will stop naive dedupe of blocks. Default: true. +buffer_compress_percentage=int If this is set, then fio will attempt to + provide IO buffer content (on WRITEs) that compress to + the specified level. Fio does this by providing a mix of + random data and zeroes. Note that this is per block size + unit, for file/disk wide compression level that matches + this setting, you'll also want to set refill_buffers. + +buffer_compress_chunk=int See buffer_compress_percentage. This + setting allows fio to manage how big the ranges of random + data and zeroed data is. Without this set, fio will + provide buffer_compress_percentage of blocksize random + data, followed by the remaining zeroed. With this set + to some chunk size smaller than the block size, fio can + alternate random and zeroed data throughout the IO + buffer. + nrfiles=int Number of files to use for this job. Defaults to 1. openfiles=int Number of files to keep open at the same time. Defaults to @@ -636,6 +652,13 @@ offset=int Start io at the given offset in the file. The data before the given offset will not be touched. This effectively caps the file size at real_size - offset. +offset_increment=int If this is provided, then the real offset becomes + the offset + offset_increment * thread_number, where the + thread number is a counter that starts at 0 and is incremented + for each job. This option is useful if there are several jobs + which are intended to operate on a file in parallel in disjoint + segments, with even spacing between the starting points. + fsync=int If writing to a file, issue a sync of the dirty data for every number of blocks given. For example, if you give 32 as a parameter, fio will sync the file for every 32 diff --git a/engines/rdma.c b/engines/rdma.c index 54fd194..79d72d2 100644 --- a/engines/rdma.c +++ b/engines/rdma.c @@ -674,7 +674,8 @@ static int fio_rdmaio_recv(struct thread_data *td, struct io_u **io_us, rdma_poll_wait(td, IBV_WC_RECV); dprint(FD_IO, "fio: recv FINISH message\n"); - exit(0); + td->done = 1; + return 0; } return i; diff --git a/filesetup.c b/filesetup.c index 446eeaf..f3d3829 100644 --- a/filesetup.c +++ b/filesetup.c @@ -713,7 +713,8 @@ int setup_files(struct thread_data *td) extend_size = total_size = 0; need_extend = 0; for_each_file(td, f, i) { - f->file_offset = td->o.start_offset; + f->file_offset = td->o.start_offset + + (td->thread_number - 1) * td->o.offset_increment; if (!td->o.file_size_low) { /* diff --git a/fio.1 b/fio.1 index 910812f..c4c90b4 100644 --- a/fio.1 +++ b/fio.1 @@ -359,6 +359,20 @@ contents to defeat normal de-dupe attempts. This is not enough to defeat more clever block compression attempts, but it will stop naive dedupe of blocks. Default: true. .TP +.BI buffer_compress_percentage \fR=\fPint +If this is set, then fio will attempt to provide IO buffer content (on WRITEs) +that compress to the specified level. Fio does this by providing a mix of +random data and zeroes. Note that this is per block size unit, for file/disk +wide compression level that matches this setting, you'll also want to set +\fBrefill_buffers\fR. +.TP +.BI buffer_compress_chunk \fR=\fPint +See \fBbuffer_compress_percentage\fR. This setting allows fio to manage how +big the ranges of random data and zeroed data is. Without this set, fio will +provide \fBbuffer_compress_percentage\fR of blocksize random data, followed by +the remaining zeroed. With this set to some chunk size smaller than the block +size, fio can alternate random and zeroed data throughout the IO buffer. +.TP .BI nrfiles \fR=\fPint Number of files to use for this job. Default: 1. .TP @@ -495,6 +509,13 @@ Default: true. .BI offset \fR=\fPint Offset in the file to start I/O. Data before the offset will not be touched. .TP +.BI offset_increment \fR=\fPint +If this is provided, then the real offset becomes the +offset + offset_increment * thread_number, where the thread number is a counter +that starts at 0 and is incremented for each job. This option is useful if +there are several jobs which are intended to operate on a file in parallel in +disjoint segments, with even spacing between the starting points. +.TP .BI fsync \fR=\fPint How many I/Os to perform before issuing an \fBfsync\fR\|(2) of dirty data. If 0, don't sync. Default: 0. diff --git a/fio.h b/fio.h index 4afdd2d..f59265a 100644 --- a/fio.h +++ b/fio.h @@ -266,6 +266,8 @@ struct thread_options { int flow_watermark; unsigned int flow_sleep; + unsigned long long offset_increment; + unsigned int sync_file_range; }; diff --git a/ioengines.c b/ioengines.c index 4c609f2..bb7833f 100644 --- a/ioengines.c +++ b/ioengines.c @@ -208,6 +208,16 @@ int td_io_getevents(struct thread_data *td, unsigned int min, unsigned int max, { int r = 0; + /* + * For ioengine=rdma one side operation RDMA_WRITE or RDMA_READ, + * server side gets a message from the client + * side that the task is finished, and + * td->done is set to 1 after td_io_commit(). In this case, + * there is no need to reap complete event in server side. + */ + if (td->done) + return 0; + if (min > 0 && td->io_ops->commit) { r = td->io_ops->commit(td); if (r < 0) @@ -278,6 +288,7 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u) */ if (io_u->error == EINVAL && td->io_issues[io_u->ddir & 1] == 1 && td->o.odirect) { + log_info("fio: first direct IO errored. File system may not " "support direct IO, or iomem_align= is bad.\n"); } diff --git a/options.c b/options.c index 463b66d..3de0221 100644 --- a/options.c +++ b/options.c @@ -1119,6 +1119,14 @@ static struct fio_option options[FIO_MAX_OPTS] = { .def = "0", }, { + .name = "offset_increment", + .type = FIO_OPT_STR_VAL, + .off1 = td_var_offset(offset_increment), + .help = "What is the increment from one offset to the next", + .parent = "offset", + .def = "0", + }, + { .name = "bs", .alias = "blocksize", .type = FIO_OPT_INT, -- 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