The following changes since commit 40c5db35d99d7b5069e5d0ecd9e7cc29add9fae6: windowsaio: style fixes (2012-02-01 23:03:44 +0100) are available in the git repository at: git://git.kernel.dk/fio.git master Jens Axboe (3): Make random map allocation more resilient Reenable io_u->buf_filled_len optimization Fio 2.0.2 Steven Lang (1): Optimize pattern filling by limiting small calls to memcpy filesetup.c | 14 +++++++++----- fio_version.h | 2 +- io_u.c | 1 + options.c | 12 ++++++++++++ os/windows/install.wxs | 2 +- os/windows/version.h | 2 +- verify.c | 17 +---------------- 7 files changed, 26 insertions(+), 24 deletions(-) --- Diff of recent changes: diff --git a/filesetup.c b/filesetup.c index 8f51592..d55af45 100644 --- a/filesetup.c +++ b/filesetup.c @@ -849,11 +849,15 @@ int init_random_map(struct thread_data *td) (unsigned long long) td->o.rw_min_bs; num_maps = (blocks + BLOCKS_PER_MAP - 1) / (unsigned long long) BLOCKS_PER_MAP; - f->file_map = smalloc(num_maps * sizeof(unsigned long)); - if (f->file_map) { - f->num_maps = num_maps; - continue; - } + if (num_maps == (unsigned long) num_maps) { + f->file_map = smalloc(num_maps * sizeof(unsigned long)); + if (f->file_map) { + f->num_maps = num_maps; + continue; + } + } else + f->file_map = NULL; + if (!td->o.softrandommap) { log_err("fio: failed allocating random map. If running" " a large number of jobs, try the 'norandommap'" diff --git a/fio_version.h b/fio_version.h index 7e820fe..36a72d3 100644 --- a/fio_version.h +++ b/fio_version.h @@ -3,6 +3,6 @@ #define FIO_MAJOR 2 #define FIO_MINOR 0 -#define FIO_PATCH 1 +#define FIO_PATCH 2 #endif diff --git a/io_u.c b/io_u.c index 428b312..54f8685 100644 --- a/io_u.c +++ b/io_u.c @@ -1147,6 +1147,7 @@ static void small_content_scramble(struct io_u *io_u) p = io_u->xfer_buf; boffset = io_u->offset; + io_u->buf_filled_len = 0; for (i = 0; i < nr_blocks; i++) { /* diff --git a/options.c b/options.c index f62ab6d..8fb93ca 100644 --- a/options.c +++ b/options.c @@ -689,12 +689,24 @@ static int str_verify_pattern_cb(void *data, const char *input) } } } + + /* + * Fill the pattern all the way to the end. This greatly reduces + * the number of memcpy's we have to do when verifying the IO. + */ + while (i > 1 && i * 2 <= MAX_PATTERN_SIZE) { + memcpy(&td->o.verify_pattern[i], &td->o.verify_pattern[0], i); + i *= 2; + } + td->o.verify_pattern_bytes = i; + /* * VERIFY_META could already be set */ if (td->o.verify == VERIFY_NONE) td->o.verify = VERIFY_PATTERN; + return 0; } diff --git a/os/windows/install.wxs b/os/windows/install.wxs index 43457e0..5e703be 100755 --- a/os/windows/install.wxs +++ b/os/windows/install.wxs @@ -3,7 +3,7 @@ <?define VersionMajor = 2?> <?define VersionMinor = 0?> -<?define VersionBuild = 1?> +<?define VersionBuild = 2?> <Product Id="*" Codepage="1252" Language="1033" diff --git a/os/windows/version.h b/os/windows/version.h index cb52a16..545ff5e 100644 --- a/os/windows/version.h +++ b/os/windows/version.h @@ -3,4 +3,4 @@ #define FIO_VERSION_MAJOR FIO_MAJOR #define FIO_VERSION_MINOR FIO_MINOR #define FIO_VERSION_BUILD FIO_PATCH -#define FIO_VERSION_STRING "2.0.1" +#define FIO_VERSION_STRING "2.0.2" diff --git a/verify.c b/verify.c index 91a9077..9ee3bc4 100644 --- a/verify.c +++ b/verify.c @@ -39,38 +39,24 @@ void fill_pattern(struct thread_data *td, void *p, unsigned int len, struct io_u io_u->rand_seed = fill_random_buf(&td->buf_state, p, len); break; case 1: - /* - * See below write barrier comment - */ -#if 0 - read_barrier(); if (io_u->buf_filled_len >= len) { dprint(FD_VERIFY, "using already filled verify pattern b=0 len=%u\n", len); return; } -#endif dprint(FD_VERIFY, "fill verify pattern b=0 len=%u\n", len); memset(p, td->o.verify_pattern[0], len); - /* - * We need to ensure that the pattern stores are seen before - * the fill length store, or we could observe headers that - * aren't valid to the extent notified by the fill length - */ - write_barrier(); io_u->buf_filled_len = len; break; default: { unsigned int i = 0, size = 0; unsigned char *b = p; -#if 0 - read_barrier(); if (io_u->buf_filled_len >= len) { dprint(FD_VERIFY, "using already filled verify pattern b=%d len=%u\n", td->o.verify_pattern_bytes, len); return; } -#endif + dprint(FD_VERIFY, "fill verify pattern b=%d len=%u\n", td->o.verify_pattern_bytes, len); @@ -81,7 +67,6 @@ void fill_pattern(struct thread_data *td, void *p, unsigned int len, struct io_u memcpy(b+i, td->o.verify_pattern, size); i += size; } - write_barrier(); io_u->buf_filled_len = len; break; } -- 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