- gcc
before_install:
- sudo apt-get -qq update
- - sudo apt-get install -y libaio-dev libnuma-dev
+ - sudo apt-get install -qq -y libaio-dev libnuma-dev libz-dev
one cpu per job. If not enough CPUs are given for the jobs
listed, then fio will roundrobin the CPUs in the set.
-numa_cpu_nodes=str Set this job running on spcified NUMA nodes' CPUs. The
+numa_cpu_nodes=str Set this job running on specified NUMA nodes' CPUs. The
arguments allow comma delimited list of cpu numbers,
A-B ranges, or 'all'. Note, to enable numa options support,
fio must be built on a system with libnuma-dev(el) installed.
The actual log names will be foo_slat.x.log, foo_clat.x.log,
and foo_lat.x.log, where x is the index of the job (1..N,
where N is the number of jobs). This helps fio_generate_plot
- fine the logs automatically. If 'per_job_logs' is false, then
+ find the logs automatically. If 'per_job_logs' is false, then
the filename will not include the job index. See 'Log File
Formats'.
;;
--disable-rbd) disable_rbd="yes"
;;
+ --disable-rbd-blkin) disable_rbd_blkin="yes"
+ ;;
--disable-gfapi) disable_gfapi="yes"
;;
--enable-libhdfs) libhdfs="yes"
echo "rbd_invalidate_cache $rbd_inval"
fi
+##########################################
+# check for blkin
+rbd_blkin="no"
+cat > $TMPC << EOF
+#include <rbd/librbd.h>
+#include <zipkin_c.h>
+
+int main(int argc, char **argv)
+{
+ int r;
+ struct blkin_trace_info t_info;
+ blkin_init_trace_info(&t_info);
+ rbd_completion_t completion;
+ rbd_image_t image;
+ uint64_t off;
+ size_t len;
+ const char *buf;
+ r = rbd_aio_write_traced(image, off, len, buf, completion, &t_info);
+ return 0;
+}
+EOF
+if test "$disable_rbd" != "yes" && test "$disable_rbd_blkin" != "yes" \
+ && compile_prog "" "-lrbd -lrados -lblkin" "rbd_blkin"; then
+ LIBS="-lblkin $LIBS"
+ rbd_blkin="yes"
+fi
+echo "rbd blkin tracing $rbd_blkin"
+
##########################################
# Check whether we have setvbuf
setvbuf="no"
if test "$rbd_inval" = "yes" ; then
output_sym "CONFIG_RBD_INVAL"
fi
+if test "$rbd_blkin" = "yes" ; then
+ output_sym "CONFIG_RBD_BLKIN"
+fi
if test "$setvbuf" = "yes" ; then
output_sym "CONFIG_SETVBUF"
fi
#include "../fio.h"
#include "../optgroup.h"
+#ifdef CONFIG_RBD_BLKIN
+#include <zipkin_c.h>
+#endif
struct fio_rbd_iou {
struct io_u *io_u;
rbd_completion_t completion;
int io_seen;
int io_complete;
+#ifdef CONFIG_RBD_BLKIN
+ struct blkin_trace_info info;
+#endif
};
struct rbd_data {
}
if (io_u->ddir == DDIR_WRITE) {
+#ifdef CONFIG_RBD_BLKIN
+ blkin_init_trace_info(&fri->info);
+ r = rbd_aio_write_traced(rbd->image, io_u->offset, io_u->xfer_buflen,
+ io_u->xfer_buf, fri->completion, &fri->info);
+#else
r = rbd_aio_write(rbd->image, io_u->offset, io_u->xfer_buflen,
io_u->xfer_buf, fri->completion);
+#endif
if (r < 0) {
log_err("rbd_aio_write failed.\n");
goto failed_comp;
}
} else if (io_u->ddir == DDIR_READ) {
+#ifdef CONFIG_RBD_BLKIN
+ blkin_init_trace_info(&fri->info);
+ r = rbd_aio_read_traced(rbd->image, io_u->offset, io_u->xfer_buflen,
+ io_u->xfer_buf, fri->completion, &fri->info);
+#else
r = rbd_aio_read(rbd->image, io_u->offset, io_u->xfer_buflen,
io_u->xfer_buf, fri->completion);
+#endif
if (r < 0) {
log_err("rbd_aio_read failed.\n");
uint64_t get_start_offset(struct thread_data *td, struct fio_file *f)
{
struct thread_options *o = &td->o;
- uint64_t offset;
if (o->file_append && f->filetype == FIO_TYPE_FILE)
return f->real_file_size;
- offset = td->o.start_offset + td->subjob_number * td->o.offset_increment;
- if (offset % td_max_bs(td))
- offset -= (offset % td_max_bs(td));
-
- return offset;
+ return td->o.start_offset +
+ td->subjob_number * td->o.offset_increment;
}
/*
* need to do.
*/
this_window = elapsed - iolog->avg_last;
- if (this_window < iolog->avg_msec) {
+ if (elapsed < iolog->avg_last)
+ return iolog->avg_last - elapsed;
+ else if (this_window < iolog->avg_msec) {
int diff = iolog->avg_msec - this_window;
if (inline_log(iolog) || diff > LOG_MSEC_SLACK)