If this is set, and the kernel supports it, buffered IO will be
uncached. This means that reads are dropped from the cache if we
are the ones instantiating the pages, and writes are sync and
dropped from the page cache on IO completion.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
unsigned int sqpoll_thread;
unsigned int sqpoll_set;
unsigned int sqpoll_cpu;
unsigned int sqpoll_thread;
unsigned int sqpoll_set;
unsigned int sqpoll_cpu;
};
static int fio_ioring_sqpoll_cb(void *data, unsigned long long *val)
};
static int fio_ioring_sqpoll_cb(void *data, unsigned long long *val)
.category = FIO_OPT_C_ENGINE,
.group = FIO_OPT_G_IOURING,
},
.category = FIO_OPT_C_ENGINE,
.group = FIO_OPT_G_IOURING,
},
+ {
+ .name = "uncached",
+ .lname = "Uncached",
+ .type = FIO_OPT_INT,
+ .off1 = offsetof(struct ioring_options, uncached),
+ .help = "Use RWF_UNCACHED for buffered read/writes",
+ .category = FIO_OPT_C_ENGINE,
+ .group = FIO_OPT_G_IOURING,
+ },
sqe->addr = (unsigned long) &ld->iovecs[io_u->index];
sqe->len = 1;
}
sqe->addr = (unsigned long) &ld->iovecs[io_u->index];
sqe->len = 1;
}
+ if (!td->o.odirect && o->uncached)
+ sqe->rw_flags = RWF_UNCACHED;
sqe->off = io_u->offset;
} else if (ddir_sync(io_u->ddir)) {
if (io_u->ddir == DDIR_SYNC_FILE_RANGE) {
sqe->off = io_u->offset;
} else if (ddir_sync(io_u->ddir)) {
if (io_u->ddir == DDIR_SYNC_FILE_RANGE) {
#define RWF_SYNC 0x00000004
#endif
#define RWF_SYNC 0x00000004
#endif
+#ifndef RWF_UNCACHED
+#define RWF_UNCACHED 0x00000020
+#endif
+
#ifndef RWF_WRITE_LIFE_SHIFT
#define RWF_WRITE_LIFE_SHIFT 4
#define RWF_WRITE_LIFE_SHORT (1 << RWF_WRITE_LIFE_SHIFT)
#ifndef RWF_WRITE_LIFE_SHIFT
#define RWF_WRITE_LIFE_SHIFT 4
#define RWF_WRITE_LIFE_SHORT (1 << RWF_WRITE_LIFE_SHIFT)