The following changes since commit f67d6ee2d0988de577f6f3d7e303d6a18a44e4a0: Makefile: fixup dependency problem for files in sub dirs (2013-02-01 15:51:23 +0100) are available in the git repository at: git://git.kernel.dk/fio.git master Bruce Cran (1): values.h is obsolete: use float.h and DBL_MIN/MAX instead. Jens Axboe (2): parse: use MIN/MAXDOUBLE instead of some representation of NAN clock: hardwire tsc as unreliable on Solaris for now Vincent Kang Fu (1): Fix percentile_list option fio.h | 2 -- gettime.c | 8 ++++++++ init.c | 25 +------------------------ options.c | 2 +- parse.c | 27 ++++++++++----------------- stat.c | 5 +---- 6 files changed, 21 insertions(+), 48 deletions(-) --- Diff of recent changes: diff --git a/fio.h b/fio.h index d18029a..370ddaa 100644 --- a/fio.h +++ b/fio.h @@ -248,7 +248,6 @@ struct thread_options { unsigned int trim_zero; unsigned long long trim_backlog; unsigned int clat_percentiles; - unsigned int overwrite_plist; fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN]; char *read_iolog_file; @@ -606,7 +605,6 @@ extern int is_backend; extern int nr_clients; extern int log_syslog; extern const char fio_version_string[]; -extern const fio_fp64_t def_percentile_list[FIO_IO_U_LIST_MAX_LEN]; extern struct thread_data *threads; diff --git a/gettime.c b/gettime.c index cc9dcb7..5c0e445 100644 --- a/gettime.c +++ b/gettime.c @@ -342,6 +342,14 @@ void fio_clock_init(void) log_err("fio: can't create TLS key\n"); #endif + /* + * Probably an AMD issue, will need to investigate. Until that + * is done, disable the CPU clock. + */ +#if FIO_OS == os_solaris + tsc_reliable = 0; +#endif + fio_clock_source_inited = fio_clock_source; calibrate_cpu_clock(); diff --git a/init.c b/init.c index dfc5a8f..52665f0 100644 --- a/init.c +++ b/init.c @@ -67,26 +67,6 @@ unsigned int *fio_debug_jobp = NULL; static char cmd_optstr[256]; static int did_arg; -const fio_fp64_t def_percentile_list[FIO_IO_U_LIST_MAX_LEN] = { - { .u.f = 1.00 }, - { .u.f = 5.00 }, - { .u.f = 10.00 }, - { .u.f = 20.00 }, - { .u.f = 30.00 }, - { .u.f = 40.00 }, - { .u.f = 50.00 }, - { .u.f = 60.00 }, - { .u.f = 70.00 }, - { .u.f = 80.00 }, - { .u.f = 90.00 }, - { .u.f = 95.00 }, - { .u.f = 99.00 }, - { .u.f = 99.50 }, - { .u.f = 99.90 }, - { .u.f = 99.95 }, - { .u.f = 99.99 }, -}; - #define FIO_CLIENT_FLAG (1 << 16) /* @@ -887,10 +867,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num) td->mutex = fio_mutex_init(FIO_MUTEX_LOCKED); td->ts.clat_percentiles = td->o.clat_percentiles; - if (td->o.overwrite_plist) - memcpy(td->ts.percentile_list, td->o.percentile_list, sizeof(td->o.percentile_list)); - else - memcpy(td->ts.percentile_list, def_percentile_list, sizeof(def_percentile_list)); + memcpy(td->ts.percentile_list, td->o.percentile_list, sizeof(td->o.percentile_list)); for (i = 0; i < DDIR_RWDIR_CNT; i++) { td->ts.clat_stat[i].min_val = ULONG_MAX; diff --git a/options.c b/options.c index 799e77a..4522fe4 100644 --- a/options.c +++ b/options.c @@ -2434,8 +2434,8 @@ static struct fio_option options[FIO_MAX_OPTS] = { .name = "percentile_list", .type = FIO_OPT_FLOAT_LIST, .off1 = td_var_offset(percentile_list), - .off2 = td_var_offset(overwrite_plist), .help = "Specify a custom list of percentiles to report", + .def = "1:5:10:20:30:40:50:60:70:80:90:95:99:99.5:99.9:99.95:99.99", .maxlen = FIO_IO_U_LIST_MAX_LEN, .minfp = 0.0, .maxfp = 100.0, diff --git a/parse.c b/parse.c index d15d22b..4ce29c1 100644 --- a/parse.c +++ b/parse.c @@ -10,11 +10,13 @@ #include <limits.h> #include <stdlib.h> #include <math.h> +#include <float.h> #include "parse.h" #include "debug.h" #include "options.h" #include "minmax.h" +#include "lib/ieee754.h" static struct fio_option *fio_options; extern unsigned int fio_get_kb_base(void *); @@ -49,11 +51,11 @@ static void show_option_range(struct fio_option *o, int (*logger)(const char *format, ...)) { if (o->type == FIO_OPT_FLOAT_LIST){ - if (isnan(o->minfp) && isnan(o->maxfp)) + if (o->minfp == DBL_MIN && o->maxfp == DBL_MAX) return; logger("%20s: min=%f", "range", o->minfp); - if (!isnan(o->maxfp)) + if (o->maxfp != DBL_MAX) logger(", max=%f", o->maxfp); logger("\n"); } else { @@ -362,7 +364,7 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data, int first, int more, int curr) { int il, *ilp; - double* flp; + fio_fp64_t *flp; long long ull, *ullp; long ul1, ul2; double uf; @@ -500,12 +502,6 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data, break; } case FIO_OPT_FLOAT_LIST: { - - if (first) { - ul2 = 1; - ilp = td_var(data, o->off2); - *ilp = ul2; - } if (curr >= o->maxlen) { log_err("the list exceeding max length %d\n", o->maxlen); @@ -515,19 +511,19 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data, log_err("not a floating point value: %s\n", ptr); return 1; } - if (!isnan(o->maxfp) && uf > o->maxfp) { + if (uf > o->maxfp) { log_err("value out of range: %f" " (range max: %f)\n", uf, o->maxfp); return 1; } - if (!isnan(o->minfp) && uf < o->minfp) { + if (uf < o->minfp) { log_err("value out of range: %f" " (range min: %f)\n", uf, o->minfp); return 1; } flp = td_var(data, o->off1); - flp[curr] = uf; + flp[curr].u.f = uf; break; } @@ -1096,11 +1092,8 @@ void option_init(struct fio_option *o) o->maxval = UINT_MAX; } if (o->type == FIO_OPT_FLOAT_LIST) { -#ifndef NAN -#define NAN __builtin_nanf("") -#endif - o->minfp = NAN; - o->maxfp = NAN; + o->minfp = DBL_MIN; + o->maxfp = DBL_MAX; } if (o->type == FIO_OPT_STR_SET && o->def) { log_err("Option %s: string set option with" diff --git a/stat.c b/stat.c index 62eee9a..fb5ff64 100644 --- a/stat.c +++ b/stat.c @@ -1210,10 +1210,7 @@ void show_run_stats(void) ts = &threadstats[j]; ts->clat_percentiles = td->o.clat_percentiles; - if (td->o.overwrite_plist) - memcpy(ts->percentile_list, td->o.percentile_list, sizeof(td->o.percentile_list)); - else - memcpy(ts->percentile_list, def_percentile_list, sizeof(def_percentile_list)); + memcpy(ts->percentile_list, td->o.percentile_list, sizeof(td->o.percentile_list)); idx++; ts->members++; -- 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