Merge git://git.kernel.dk/fio into steady-state
authorVincent Fu <Vincent.Fu@sandisk.com>
Tue, 13 Dec 2016 14:20:52 +0000 (09:20 -0500)
committerVincent Fu <Vincent.Fu@sandisk.com>
Tue, 13 Dec 2016 14:20:52 +0000 (09:20 -0500)
15 files changed:
1  2 
HOWTO
Makefile
backend.c
cconv.c
client.c
fio.1
fio.h
init.c
libfio.c
options.c
server.c
server.h
stat.c
stat.h
thread_options.h

diff --cc HOWTO
Simple merge
diff --cc Makefile
Simple merge
diff --cc backend.c
Simple merge
diff --cc cconv.c
Simple merge
diff --cc client.c
Simple merge
diff --cc fio.1
Simple merge
diff --cc fio.h
Simple merge
diff --cc init.c
Simple merge
diff --cc libfio.c
+++ b/libfio.c
@@@ -148,12 -148,10 +148,11 @@@ void reset_all_stats(struct thread_dat
                td->rwmix_issues = 0;
        }
  
-       fio_gettime(&tv, NULL);
-       memcpy(&td->epoch, &tv, sizeof(tv));
-       memcpy(&td->start, &tv, sizeof(tv));
-       memcpy(&td->iops_sample_time, &tv, sizeof(tv));
-       memcpy(&td->bw_sample_time, &tv, sizeof(tv));
-       memcpy(&td->ss.prev_time, &tv, sizeof(tv));
+       set_epoch_time(td, td->o.log_unix_epoch);
+       memcpy(&td->start, &td->epoch, sizeof(struct timeval));
+       memcpy(&td->iops_sample_time, &td->epoch, sizeof(struct timeval));
+       memcpy(&td->bw_sample_time, &td->epoch, sizeof(struct timeval));
++      memcpy(&td->ss.prev_time, &td->epoch, sizeof(struct timeval));
  
        lat_target_reset(td);
        clear_rusage_stat(td);
diff --cc options.c
Simple merge
diff --cc server.c
+++ b/server.c
@@@ -1539,41 -1541,13 +1543,41 @@@ void fio_server_send_ts(struct thread_s
        p.ts.latency_window     = cpu_to_le64(ts->latency_window);
        p.ts.latency_percentile.u.i = cpu_to_le64(fio_double_to_uint64(ts->latency_percentile.u.f));
  
-       p.ts.nr_block_infos     = le64_to_cpu(ts->nr_block_infos);
+       p.ts.nr_block_infos     = cpu_to_le64(ts->nr_block_infos);
        for (i = 0; i < p.ts.nr_block_infos; i++)
-               p.ts.block_infos[i] = le32_to_cpu(ts->block_infos[i]);
+               p.ts.block_infos[i] = cpu_to_le32(ts->block_infos[i]);
  
 +      p.ts.ss_dur             = cpu_to_le64(ts->ss_dur);
 +      p.ts.ss_state           = cpu_to_le32(ts->ss_state);
 +      p.ts.ss_head            = cpu_to_le32(ts->ss_head);
 +      p.ts.ss_limit.u.i       = cpu_to_le64(fio_double_to_uint64(ts->ss_limit.u.f));
 +      p.ts.ss_slope.u.i       = cpu_to_le64(fio_double_to_uint64(ts->ss_slope.u.f));
 +      p.ts.ss_deviation.u.i   = cpu_to_le64(fio_double_to_uint64(ts->ss_deviation.u.f));
 +      p.ts.ss_criterion.u.i   = cpu_to_le64(fio_double_to_uint64(ts->ss_criterion.u.f));
 +
        convert_gs(&p.rs, rs);
  
 -      fio_net_queue_cmd(FIO_NET_CMD_TS, &p, sizeof(p), NULL, SK_F_COPY);
 +      dprint(FD_NET, "ts->ss_state = %d\n", ts->ss_state);
 +      if (ts->ss_state & __FIO_SS_DATA) {
 +              dprint(FD_NET, "server sending steadystate ring buffers\n");
 +
 +              ss_buf = malloc(sizeof(p) + 2*ts->ss_dur*sizeof(uint64_t));
 +
 +              memcpy(ss_buf, &p, sizeof(p));
 +
 +              ss_iops = (uint64_t *) ((struct cmd_ts_pdu *)ss_buf + 1);
 +              ss_bw = ss_iops + (int) ts->ss_dur;
 +              for (i = 0; i < ts->ss_dur; i++) {
 +                      ss_iops[i] = cpu_to_le64(ts->ss_iops_data[i]);
 +                      ss_bw[i] = cpu_to_le64(ts->ss_bw_data[i]);
 +              }
 +
 +              fio_net_queue_cmd(FIO_NET_CMD_TS, ss_buf, sizeof(p) + 2*ts->ss_dur*sizeof(uint64_t), NULL, SK_F_COPY);
 +
 +              free(ss_buf);
 +      }
 +      else
 +              fio_net_queue_cmd(FIO_NET_CMD_TS, &p, sizeof(p), NULL, SK_F_COPY);
  }
  
  void fio_server_send_gs(struct group_run_stats *rs)
diff --cc server.h
+++ b/server.h
@@@ -38,7 -38,7 +38,7 @@@ struct fio_net_cmd_reply 
  };
  
  enum {
-       FIO_SERVER_VER                  = 57,
 -      FIO_SERVER_VER                  = 59,
++      FIO_SERVER_VER                  = 60,
  
        FIO_SERVER_MAX_FRAGMENT_PDU     = 1024,
        FIO_SERVER_MAX_CMD_MB           = 2048,
diff --cc stat.c
Simple merge
diff --cc stat.h
Simple merge
Simple merge