Recent changes (master)
The following changes since commit d86ac3e9f4c703b7d7c9add96e69f2d02affdc65:
Merge branch 'trim-support' of https://github.com/ankit-sam/fio (2023-03-27 13:21:25 -0600)
are available in the Git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to 638689b15af35bd746f9114a3e8895e7a983ed83:
Only expose fadvise_hint=noreuse if supported (2023-03-31 12:52:01 -0600)
----------------------------------------------------------------
Jens Axboe (1):
Only expose fadvise_hint=noreuse if supported
Yuanchu Xie (2):
fio: add support for POSIX_FADV_NOREUSE
docs: add noreuse fadvise_hint option
HOWTO.rst | 5 +++++ fio.1 | 5 +++++ fio.h | 1 + ioengines.c | 4 ++++ options.c | 7 +++++++ 5 files changed, 22 insertions(+)
---
Diff of recent changes:
HOWTO.rst +5 -0
@@ -1308,6 +1308,11 @@ I/O type **random** Advise using **FADV_RANDOM**. + **noreuse** + Advise using **FADV_NOREUSE**. This may be a no-op on older Linux + kernels. Since Linux 6.3, it provides a hint to the LRU algorithm. + See the :manpage:`posix_fadvise(2)` man page. + .. option:: write_hint=str Use :manpage:`fcntl(2)` to advise the kernel what life time to expect
fio.1 +5 -0
@@ -1098,6 +1098,11 @@ Advise using FADV_SEQUENTIAL. .TP .B random Advise using FADV_RANDOM. +.TP +.B noreuse +Advise using FADV_NOREUSE. This may be a no-op on older Linux +kernels. Since Linux 6.3, it provides a hint to the LRU algorithm. +See the \fBposix_fadvise\fR\|(2) man page. .RE .RE .TP
fio.h +1 -0
@@ -163,6 +163,7 @@ enum {F_ADV_TYPE ,F_ADV_RANDOM ,F_ADV_SEQUENTIAL , + F_ADV_NOREUSE, };/*
ioengines.c +4 -0
@@ -565,6 +565,10 @@ int td_io_open_file(struct thread_data *td, struct fio_file *f) flags =POSIX_FADV_RANDOM ; else if (td->o.fadvise_hint == F_ADV_SEQUENTIAL) flags =POSIX_FADV_SEQUENTIAL ; +#ifdef POSIX_FADV_NOREUSE + else if (td->o.fadvise_hint == F_ADV_NOREUSE) + flags =POSIX_FADV_NOREUSE ; +#endif else {log_err ("fio: unknown fadvise type %d\n" , td->o.fadvise_hint);
options.c +7 -0
@@ -4,6 +4,7 @@#include <ctype.h> #include <string.h> #include <assert.h> +#include <fcntl.h> #include <sys/stat.h> #include <netinet/in.h>
@@ -2740,6 +2741,12 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .oval = F_ADV_SEQUENTIAL, .help = "Advise using FADV_SEQUENTIAL", }, +#ifdef POSIX_FADV_NOREUSE + { .ival = "noreuse", + .oval = F_ADV_NOREUSE, + .help = "Advise using FADV_NOREUSE", + }, +#endif }, .help = "Use fadvise() to advise the kernel on IO pattern", .def = "1",