X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=engines%2Fsync.c;h=65fd210cf108293e84f45057726c30e81881a751;hp=b3e1c9db8ba3eeb9d87567dc53b69de5759be715;hb=bb707dffbc345af79474a592991b61dee92831ef;hpb=4a87b5840d35584fd872571d37c69d7544b1b00f 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;