X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=options.c;h=6bd745553644283681c095853bca80483671c975;hp=a174e2cd165316494211a256428c758632da7d86;hb=fd98fb689d5ad7e9977461e961fff3fdd37f9cb8;hpb=d81d0f992bb3f12be22311b81b6b0b209e42c33b diff --git a/options.c b/options.c index a174e2cd..6bd74555 100644 --- a/options.c +++ b/options.c @@ -52,7 +52,7 @@ static int bs_cmp(const void *p1, const void *p2) struct split { unsigned int nr; - unsigned int val1[ZONESPLIT_MAX]; + unsigned long long val1[ZONESPLIT_MAX]; unsigned long long val2[ZONESPLIT_MAX]; }; @@ -119,7 +119,7 @@ static int bssplit_ddir(struct thread_options *o, enum fio_ddir ddir, char *str, bool data) { unsigned int i, perc, perc_missing; - unsigned int max_bs, min_bs; + unsigned long long max_bs, min_bs; struct split split; memset(&split, 0, sizeof(split)); @@ -959,48 +959,6 @@ static int zone_split_ddir(struct thread_options *o, enum fio_ddir ddir, return 0; } -static void __td_zone_gen_index(struct thread_data *td, enum fio_ddir ddir) -{ - unsigned int i, j, sprev, aprev; - uint64_t sprev_sz; - - td->zone_state_index[ddir] = malloc(sizeof(struct zone_split_index) * 100); - - sprev_sz = sprev = aprev = 0; - for (i = 0; i < td->o.zone_split_nr[ddir]; i++) { - struct zone_split *zsp = &td->o.zone_split[ddir][i]; - - for (j = aprev; j < aprev + zsp->access_perc; j++) { - struct zone_split_index *zsi = &td->zone_state_index[ddir][j]; - - zsi->size_perc = sprev + zsp->size_perc; - zsi->size_perc_prev = sprev; - - zsi->size = sprev_sz + zsp->size; - zsi->size_prev = sprev_sz; - } - - aprev += zsp->access_perc; - sprev += zsp->size_perc; - sprev_sz += zsp->size; - } -} - -/* - * Generate state table for indexes, so we don't have to do it inline from - * the hot IO path - */ -static void td_zone_gen_index(struct thread_data *td) -{ - int i; - - td->zone_state_index = malloc(DDIR_RWDIR_CNT * - sizeof(struct zone_split_index *)); - - for (i = 0; i < DDIR_RWDIR_CNT; i++) - __td_zone_gen_index(td, i); -} - static int parse_zoned_distribution(struct thread_data *td, const char *input, bool absolute) { @@ -1055,9 +1013,7 @@ static int parse_zoned_distribution(struct thread_data *td, const char *input, return ret; } - if (!ret) - td_zone_gen_index(td); - else { + if (ret) { for (i = 0; i < DDIR_RWDIR_CNT; i++) td->o.zone_split_nr[i] = 0; } @@ -1284,6 +1240,23 @@ int set_name_idx(char *target, size_t tlen, char *input, int index, return len; } +char* get_name_by_idx(char *input, int index) +{ + unsigned int cur_idx; + char *fname, *str, *p; + + p = str = strdup(input); + + index %= get_max_name_idx(input); + for (cur_idx = 0; cur_idx <= index; cur_idx++) + fname = get_next_name(&str); + + fname = strdup(fname); + free(p); + + return fname; +} + static int str_filename_cb(void *data, const char *input) { struct thread_data *td = cb_data_to_td(data); @@ -1855,11 +1828,6 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .help = "RDMA IO engine", }, #endif -#ifdef CONFIG_FUSION_AW - { .ival = "fusion-aw-sync", - .help = "Fusion-io atomic write engine", - }, -#endif #ifdef CONFIG_LINUX_EXT4_MOVE_EXTENT { .ival = "e4defrag", .help = "ext4 defrag engine", @@ -1889,6 +1857,17 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { }, #endif +#ifdef CONFIG_IME + { .ival = "ime_psync", + .help = "DDN's IME synchronous IO engine", + }, + { .ival = "ime_psyncv", + .help = "DDN's IME synchronous IO engine using iovecs", + }, + { .ival = "ime_aio", + .help = "DDN's IME asynchronous IO engine", + }, +#endif #ifdef CONFIG_LINUX_DEVDAX { .ival = "dev-dax", .help = "DAX Device based IO engine", @@ -1906,6 +1885,11 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { { .ival = "libpmem", .help = "PMDK libpmem based IO engine", }, +#endif +#ifdef CONFIG_HTTP + { .ival = "http", + .help = "HTTP (WebDAV/S3) IO engine", + }, #endif }, }, @@ -2112,7 +2096,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .name = "bs", .lname = "Block size", .alias = "blocksize", - .type = FIO_OPT_INT, + .type = FIO_OPT_ULL, .off1 = offsetof(struct thread_options, bs[DDIR_READ]), .off2 = offsetof(struct thread_options, bs[DDIR_WRITE]), .off3 = offsetof(struct thread_options, bs[DDIR_TRIM]), @@ -2129,7 +2113,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .name = "ba", .lname = "Block size align", .alias = "blockalign", - .type = FIO_OPT_INT, + .type = FIO_OPT_ULL, .off1 = offsetof(struct thread_options, ba[DDIR_READ]), .off2 = offsetof(struct thread_options, ba[DDIR_WRITE]), .off3 = offsetof(struct thread_options, ba[DDIR_TRIM]), @@ -2163,7 +2147,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { { .name = "bssplit", .lname = "Block size split", - .type = FIO_OPT_STR, + .type = FIO_OPT_STR_ULL, .cb = str_bssplit_cb, .off1 = offsetof(struct thread_options, bssplit), .help = "Set a specific mix of block sizes", @@ -3134,6 +3118,17 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .category = FIO_OPT_C_IO, .group = FIO_OPT_G_IOLOG, }, + { + .name = "read_iolog_chunked", + .lname = "Read I/O log in parts", + .type = FIO_OPT_BOOL, + .off1 = offsetof(struct thread_options, read_iolog_chunked), + .def = "0", + .parent = "read_iolog", + .help = "Parse IO pattern in chunks", + .category = FIO_OPT_C_IO, + .group = FIO_OPT_G_IOLOG, + }, { .name = "replay_no_stall", .lname = "Don't stall on replay", @@ -3239,6 +3234,30 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .help = "Your platform does not support IO scheduler switching", }, #endif + { + .name = "zonemode", + .lname = "Zone mode", + .help = "Mode for the zonesize, zonerange and zoneskip parameters", + .type = FIO_OPT_STR, + .off1 = offsetof(struct thread_options, zone_mode), + .def = "none", + .category = FIO_OPT_C_IO, + .group = FIO_OPT_G_ZONE, + .posval = { + { .ival = "none", + .oval = ZONE_MODE_NONE, + .help = "no zoning", + }, + { .ival = "strided", + .oval = ZONE_MODE_STRIDED, + .help = "strided mode - random I/O is restricted to a single zone", + }, + { .ival = "zbd", + .oval = ZONE_MODE_ZBD, + .help = "zoned block device mode - random I/O selects one of multiple zones randomly", + }, + }, + }, { .name = "zonesize", .lname = "Zone size", @@ -3272,6 +3291,52 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .category = FIO_OPT_C_IO, .group = FIO_OPT_G_ZONE, }, + { + .name = "read_beyond_wp", + .lname = "Allow reads beyond the zone write pointer", + .type = FIO_OPT_BOOL, + .off1 = offsetof(struct thread_options, read_beyond_wp), + .help = "Allow reads beyond the zone write pointer", + .def = "0", + .category = FIO_OPT_C_IO, + .group = FIO_OPT_G_INVALID, + }, + { + .name = "max_open_zones", + .lname = "Maximum number of open zones", + .type = FIO_OPT_INT, + .off1 = offsetof(struct thread_options, max_open_zones), + .maxval = FIO_MAX_OPEN_ZBD_ZONES, + .help = "Limit random writes to SMR drives to the specified" + " number of sequential zones", + .def = "0", + .category = FIO_OPT_C_IO, + .group = FIO_OPT_G_INVALID, + }, + { + .name = "zone_reset_threshold", + .lname = "Zone reset threshold", + .help = "Zoned block device reset threshold", + .type = FIO_OPT_FLOAT_LIST, + .maxlen = 1, + .off1 = offsetof(struct thread_options, zrt), + .minfp = 0, + .maxfp = 1, + .category = FIO_OPT_C_IO, + .group = FIO_OPT_G_ZONE, + }, + { + .name = "zone_reset_frequency", + .lname = "Zone reset frequency", + .help = "Zoned block device zone reset frequency in HZ", + .type = FIO_OPT_FLOAT_LIST, + .maxlen = 1, + .off1 = offsetof(struct thread_options, zrf), + .minfp = 0, + .maxfp = 1, + .category = FIO_OPT_C_IO, + .group = FIO_OPT_G_ZONE, + }, { .name = "lockmem", .lname = "Lock memory",