X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=io_u.c;h=da6fe8f3af0a55f2f0a26680f257b78f6996d0de;hp=834e5d214d5da390365858f36d67ed3fd67127a6;hb=cec6b55da1c282b5b91ad346c7804171fccf151e;hpb=ee88470c001012d08ae37bfc31741a935be2e7a1 diff --git a/io_u.c b/io_u.c index 834e5d21..da6fe8f3 100644 --- a/io_u.c +++ b/io_u.c @@ -227,6 +227,31 @@ static int fill_io_u(struct thread_data *td, struct fio_file *f, return 1; } +static void io_u_mark_depth(struct thread_data *td) +{ + int index = 0; + + switch (td->cur_depth) { + default: + index++; + case 32 ... 63: + index++; + case 16 ... 31: + index++; + case 8 ... 15: + index++; + case 4 ... 7: + index++; + case 2 ... 3: + index++; + case 1: + break; + } + + td->io_u_map[index]++; + td->total_io_u++; +} + struct io_u *__get_io_u(struct thread_data *td) { struct io_u *io_u = NULL; @@ -240,6 +265,7 @@ struct io_u *__get_io_u(struct thread_data *td) list_del(&io_u->list); list_add(&io_u->list, &td->io_u_busylist); td->cur_depth++; + io_u_mark_depth(td); } return io_u; @@ -296,6 +322,8 @@ struct io_u *get_io_u(struct thread_data *td, struct fio_file *f) return NULL; } + io_u->xfer_buf = io_u->buf; + io_u->xfer_buflen = io_u->buflen; fio_gettime(&io_u->start_time, NULL); return io_u; }