From bb707dffbc345af79474a592991b61dee92831ef Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 6 Dec 2019 09:08:29 -0700 Subject: [PATCH] pvsync2: add support for RWF_UNCACHED See commit 4a87b5840d35 ("io_uring: add support for RWF_UNCACHED") for details on this feature. Signed-off-by: Jens Axboe --- engines/sync.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/engines/sync.c b/engines/sync.c index b3e1c9db..65fd210c 100644 --- a/engines/sync.c +++ b/engines/sync.c @@ -39,6 +39,7 @@ struct psyncv2_options { void *pad; unsigned int hipri; unsigned int hipri_percentage; + unsigned int uncached; }; static struct fio_option options[] = { @@ -63,6 +64,15 @@ static struct fio_option options[] = { .category = FIO_OPT_C_ENGINE, .group = FIO_OPT_G_INVALID, }, + { + .name = "uncached", + .lname = "Uncached", + .type = FIO_OPT_INT, + .off1 = offsetof(struct psyncv2_options, uncached), + .help = "Use RWF_UNCACHED for buffered read/writes", + .category = FIO_OPT_C_ENGINE, + .group = FIO_OPT_G_INVALID, + }, { .name = NULL, }, @@ -152,6 +162,8 @@ static enum fio_q_status fio_pvsyncio2_queue(struct thread_data *td, if (o->hipri && (rand_between(&sd->rand_state, 1, 100) <= o->hipri_percentage)) flags |= RWF_HIPRI; + if (!td->o.odirect && o->uncached) + flags |= RWF_UNCACHED; iov->iov_base = io_u->xfer_buf; iov->iov_len = io_u->xfer_buflen; -- 2.25.1