Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Dec 2, 2018

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit a0318e176ace1e53b0049965f63b0c60b55ff8cd:

gettime: use nsec in get_cycles_per_msec division (2018-11-29 11:21:18 -0700)

are available in the git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to 68afa5b570a7e0dce0470817037f7828cf36cd2f:

stat: assign for first stat iteration, don't sum (2018-11-30 14:44:25 -0700)

----------------------------------------------------------------
Jens Axboe (3):
engines/libaio: only initialize iocb members when we need to
stat: only apply proper stat summing for event timestamps
stat: assign for first stat iteration, don't sum

 engines/libaio.c | 24 +++++++++++++++--------
 stat.c           | 60 ++++++++++++++++++++++++++++++++++++++++++--------------
 2 files changed, 61 insertions(+), 23 deletions(-)

---

Diff of recent changes:

engines/libaio.c +16 -8
index d386d14..9c8a61b 100644
@@ -125,16 +125,20 @@ static int fio_libaio_prep(struct thread_data fio_unused *td, struct io_u *io_u)
 	else
 		iocb = &io_u->iocb;
 
-	iocb->u.c.flags = 0;
-
 	if (io_u->ddir == DDIR_READ) {
-		io_prep_pread(iocb, f->fd, io_u->xfer_buf, io_u->xfer_buflen, io_u->offset);
-		if (o->hipri)
-			iocb->u.c.flags |= IOCB_FLAG_HIPRI;
+		if (o->fixedbufs) {
+			iocb->aio_fildes = f->fd;
+			iocb->aio_lio_opcode = IO_CMD_PREAD;
+			iocb->u.c.offset = io_u->offset;
+		} else
+			io_prep_pread(iocb, f->fd, io_u->xfer_buf, io_u->xfer_buflen, io_u->offset);
 	} else if (io_u->ddir == DDIR_WRITE) {
-		io_prep_pwrite(iocb, f->fd, io_u->xfer_buf, io_u->xfer_buflen, io_u->offset);
-		if (o->hipri)
-			iocb->u.c.flags |= IOCB_FLAG_HIPRI;
+		if (o->fixedbufs) {
+			iocb->aio_fildes = f->fd;
+			iocb->aio_lio_opcode = IO_CMD_PWRITE;
+			iocb->u.c.offset = io_u->offset;
+		} else
+			io_prep_pwrite(iocb, f->fd, io_u->xfer_buf, io_u->xfer_buflen, io_u->offset);
 	} else if (ddir_sync(io_u->ddir))
 		io_prep_fsync(iocb, f->fd);
 
@@ -468,6 +472,10 @@ static int fio_libaio_post_init(struct thread_data *td)
 			iocb = &ld->user_iocbs[i];
 			iocb->u.c.buf = io_u->buf;
 			iocb->u.c.nbytes = td_max_bs(td);
+
+			iocb->u.c.flags = 0;
+			if (o->hipri)
+				iocb->u.c.flags |= IOCB_FLAG_HIPRI;
 		}
 	}
 
stat.c +45 -15

93 lines not on this page · raw message