options: make max_latency a 64-bit variable
authorJens Axboe <axboe@kernel.dk>
Thu, 30 Nov 2017 04:47:43 +0000 (21:47 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 30 Nov 2017 04:47:43 +0000 (21:47 -0700)
Also removes one pad in the thread options. This should bump
the protocol version, but we just did that, so let it slide.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
cconv.c
thread_options.h

diff --git a/cconv.c b/cconv.c
index 1a41dc3e6b10b187311b91cdaaac84b50229eca3..5ed464065a0ed940e9c4c8298978802ea493047a 100644 (file)
--- a/cconv.c
+++ b/cconv.c
@@ -234,7 +234,6 @@ void convert_thread_options_to_cpu(struct thread_options *o,
        o->loops = le32_to_cpu(top->loops);
        o->mem_type = le32_to_cpu(top->mem_type);
        o->mem_align = le32_to_cpu(top->mem_align);
        o->loops = le32_to_cpu(top->loops);
        o->mem_type = le32_to_cpu(top->mem_type);
        o->mem_align = le32_to_cpu(top->mem_align);
-       o->max_latency = le32_to_cpu(top->max_latency);
        o->stonewall = le32_to_cpu(top->stonewall);
        o->new_group = le32_to_cpu(top->new_group);
        o->numjobs = le32_to_cpu(top->numjobs);
        o->stonewall = le32_to_cpu(top->stonewall);
        o->new_group = le32_to_cpu(top->new_group);
        o->numjobs = le32_to_cpu(top->numjobs);
@@ -283,6 +282,7 @@ void convert_thread_options_to_cpu(struct thread_options *o,
        o->sync_file_range = le32_to_cpu(top->sync_file_range);
        o->latency_target = le64_to_cpu(top->latency_target);
        o->latency_window = le64_to_cpu(top->latency_window);
        o->sync_file_range = le32_to_cpu(top->sync_file_range);
        o->latency_target = le64_to_cpu(top->latency_target);
        o->latency_window = le64_to_cpu(top->latency_window);
+       o->max_latency = le64_to_cpu(top->max_latency);
        o->latency_percentile.u.f = fio_uint64_to_double(le64_to_cpu(top->latency_percentile.u.i));
        o->compress_percentage = le32_to_cpu(top->compress_percentage);
        o->compress_chunk = le32_to_cpu(top->compress_chunk);
        o->latency_percentile.u.f = fio_uint64_to_double(le64_to_cpu(top->latency_percentile.u.i));
        o->compress_percentage = le32_to_cpu(top->compress_percentage);
        o->compress_chunk = le32_to_cpu(top->compress_chunk);
@@ -423,7 +423,6 @@ void convert_thread_options_to_net(struct thread_options_pack *top,
        top->loops = cpu_to_le32(o->loops);
        top->mem_type = cpu_to_le32(o->mem_type);
        top->mem_align = cpu_to_le32(o->mem_align);
        top->loops = cpu_to_le32(o->loops);
        top->mem_type = cpu_to_le32(o->mem_type);
        top->mem_align = cpu_to_le32(o->mem_align);
-       top->max_latency = cpu_to_le32(o->max_latency);
        top->stonewall = cpu_to_le32(o->stonewall);
        top->new_group = cpu_to_le32(o->new_group);
        top->numjobs = cpu_to_le32(o->numjobs);
        top->stonewall = cpu_to_le32(o->stonewall);
        top->new_group = cpu_to_le32(o->new_group);
        top->numjobs = cpu_to_le32(o->numjobs);
@@ -472,6 +471,7 @@ void convert_thread_options_to_net(struct thread_options_pack *top,
        top->sync_file_range = cpu_to_le32(o->sync_file_range);
        top->latency_target = __cpu_to_le64(o->latency_target);
        top->latency_window = __cpu_to_le64(o->latency_window);
        top->sync_file_range = cpu_to_le32(o->sync_file_range);
        top->latency_target = __cpu_to_le64(o->latency_target);
        top->latency_window = __cpu_to_le64(o->latency_window);
+       top->max_latency = __cpu_to_le64(o->max_latency);
        top->latency_percentile.u.i = __cpu_to_le64(fio_double_to_uint64(o->latency_percentile.u.f));
        top->compress_percentage = cpu_to_le32(o->compress_percentage);
        top->compress_chunk = cpu_to_le32(o->compress_chunk);
        top->latency_percentile.u.i = __cpu_to_le64(fio_double_to_uint64(o->latency_percentile.u.f));
        top->compress_percentage = cpu_to_le32(o->compress_percentage);
        top->compress_chunk = cpu_to_le32(o->compress_chunk);
index 050cd382291456c71392235ae95b9790703a71ae..353230055fb473ddb03a7f12b1f84cb966fce946 100644 (file)
@@ -192,7 +192,7 @@ struct thread_options {
        enum fio_memtype mem_type;
        unsigned int mem_align;
 
        enum fio_memtype mem_type;
        unsigned int mem_align;
 
-       unsigned int max_latency;
+       unsigned long long max_latency;
 
        unsigned int stonewall;
        unsigned int new_group;
 
        unsigned int stonewall;
        unsigned int new_group;
@@ -429,7 +429,8 @@ struct thread_options_pack {
 
        uint32_t random_distribution;
        uint32_t exitall_error;
 
        uint32_t random_distribution;
        uint32_t exitall_error;
-       uint32_t pad;
+
+       uint32_t sync_file_range;
 
        struct zone_split zone_split[DDIR_RWDIR_CNT][ZONESPLIT_MAX];
        uint32_t zone_split_nr[DDIR_RWDIR_CNT];
 
        struct zone_split zone_split[DDIR_RWDIR_CNT][ZONESPLIT_MAX];
        uint32_t zone_split_nr[DDIR_RWDIR_CNT];
@@ -469,8 +470,6 @@ struct thread_options_pack {
        uint32_t mem_type;
        uint32_t mem_align;
 
        uint32_t mem_type;
        uint32_t mem_align;
 
-       uint32_t max_latency;
-
        uint32_t stonewall;
        uint32_t new_group;
        uint32_t numjobs;
        uint32_t stonewall;
        uint32_t new_group;
        uint32_t numjobs;
@@ -521,6 +520,7 @@ struct thread_options_pack {
        uint64_t trim_backlog;
        uint32_t clat_percentiles;
        uint32_t percentile_precision;
        uint64_t trim_backlog;
        uint32_t clat_percentiles;
        uint32_t percentile_precision;
+       uint32_t pad;
        fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN];
 
        uint8_t read_iolog_file[FIO_TOP_STR_MAX];
        fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN];
 
        uint8_t read_iolog_file[FIO_TOP_STR_MAX];
@@ -581,11 +581,9 @@ struct thread_options_pack {
        uint64_t offset_increment;
        uint64_t number_ios;
 
        uint64_t offset_increment;
        uint64_t number_ios;
 
-       uint32_t sync_file_range;
-       uint32_t pad2;
-
        uint64_t latency_target;
        uint64_t latency_window;
        uint64_t latency_target;
        uint64_t latency_window;
+       uint64_t max_latency;
        fio_fp64_t latency_percentile;
 
        uint32_t sig_figs;
        fio_fp64_t latency_percentile;
 
        uint32_t sig_figs;