Signed-off-by: Jens Axboe <axboe@fb.com>
If set, fio will use POSIX_FADV_SEQUENTIAL for sequential
IO and POSIX_FADV_RANDOM for random IO.
If set, fio will use POSIX_FADV_SEQUENTIAL for sequential
IO and POSIX_FADV_RANDOM for random IO.
+fadvise_stream=int Notify the kernel what write stream ID to place these
+ writes under. Only supported on Linux. Note, this option
+ may change going forward.
+
size=int The total size of file io for this job. Fio will run until
this many bytes has been transferred, unless runtime is
limited by other options (such as 'runtime', for instance,
size=int The total size of file io for this job. Fio will run until
this many bytes has been transferred, unless runtime is
limited by other options (such as 'runtime', for instance,
Use \fBposix_fadvise\fR\|(2) to advise the kernel what I/O patterns
are likely to be issued. Default: true.
.TP
Use \fBposix_fadvise\fR\|(2) to advise the kernel what I/O patterns
are likely to be issued. Default: true.
.TP
+.BI fadvise_stream \fR=\fPint
+Use \fBposix_fadvise\fR\|(2) to advise the kernel what stream ID the
+writes issued belong to. Only supported on Linux. Note, this option
+may change going forward.
+.TP
.BI size \fR=\fPint
Total size of I/O for this job. \fBfio\fR will run until this many bytes have
been transferred, unless limited by other options (\fBruntime\fR, for instance,
.BI size \fR=\fPint
Total size of I/O for this job. \fBfio\fR will run until this many bytes have
been transferred, unless limited by other options (\fBruntime\fR, for instance,
+#ifdef FIO_HAVE_STREAMID
+ if (td->o.fadvise_stream &&
+ (f->filetype == FIO_TYPE_BD || f->filetype == FIO_TYPE_FILE)) {
+ off_t stream = td->o.fadvise_stream;
+
+ if (posix_fadvise(f->fd, stream, f->io_size, POSIX_FADV_STREAMID) < 0) {
+ td_verror(td, errno, "fadvise streamid");
+ goto err;
+ }
+ }
+#endif
#ifdef FIO_OS_DIRECTIO
/*
#ifdef FIO_OS_DIRECTIO
/*
.category = FIO_OPT_C_FILE,
.group = FIO_OPT_G_INVALID,
},
.category = FIO_OPT_C_FILE,
.group = FIO_OPT_G_INVALID,
},
+#ifdef FIO_HAVE_STREAMID
+ {
+ .name = "fadvise_stream",
+ .lname = "Fadvise stream",
+ .type = FIO_OPT_INT,
+ .off1 = td_var_offset(fadvise_stream),
+ .help = "Use fadvise() to set stream ID",
+ .category = FIO_OPT_C_FILE,
+ .group = FIO_OPT_G_INVALID,
+ },
+#endif
{
.name = "fsync",
.lname = "Fsync",
{
.name = "fsync",
.lname = "Fsync",
+#ifndef POSIX_FADV_STREAMID
+#define POSIX_FADV_STREAMID 8
+#endif
+
+#define FIO_HAVE_STREAMID
+
FIO_SERVER_MAX_FRAGMENT_PDU = 1024,
FIO_SERVER_MAX_CMD_MB = 2048,
FIO_SERVER_MAX_FRAGMENT_PDU = 1024,
FIO_SERVER_MAX_CMD_MB = 2048,
unsigned int file_service_type;
unsigned int group_reporting;
unsigned int fadvise_hint;
unsigned int file_service_type;
unsigned int group_reporting;
unsigned int fadvise_hint;
+ unsigned int fadvise_stream;
enum fio_fallocate_mode fallocate_mode;
unsigned int zero_buffers;
unsigned int refill_buffers;
enum fio_fallocate_mode fallocate_mode;
unsigned int zero_buffers;
unsigned int refill_buffers;
uint32_t file_service_type;
uint32_t group_reporting;
uint32_t fadvise_hint;
uint32_t file_service_type;
uint32_t group_reporting;
uint32_t fadvise_hint;
+ uint32_t fadvise_stream;
uint32_t fallocate_mode;
uint32_t zero_buffers;
uint32_t refill_buffers;
uint32_t fallocate_mode;
uint32_t zero_buffers;
uint32_t refill_buffers;
uint64_t trim_backlog;
uint32_t clat_percentiles;
uint32_t percentile_precision;
uint64_t trim_backlog;
uint32_t clat_percentiles;
uint32_t percentile_precision;
fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN];
uint8_t read_iolog_file[FIO_TOP_STR_MAX];
fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN];
uint8_t read_iolog_file[FIO_TOP_STR_MAX];