The following changes since commit f2415d711a11fec6d5e4081a7bdc060b98c76043: t/io_uring: fix size confusion in allocate_mem() (2024-11-05 07:57:41 -0700) are available in the Git repository at: git://git.kernel.dk/fio.git master for you to fetch changes up to dc03e3788e2b47281b67e9354a7ff02a3053264a: docs: explain type of memory allocated by md_per_io_size (2024-11-22 19:50:06 +0000) ---------------------------------------------------------------- Vincent Fu (2): engines/io_uring_cmd: disable iomem=malloc check for metadata docs: explain type of memory allocated by md_per_io_size HOWTO.rst | 4 +++- engines/io_uring.c | 10 ++-------- fio.1 | 4 +++- 3 files changed, 8 insertions(+), 10 deletions(-) --- Diff of recent changes: diff --git a/HOWTO.rst b/HOWTO.rst index 2a57f60a..504a64b8 100644 --- a/HOWTO.rst +++ b/HOWTO.rst @@ -2591,7 +2591,9 @@ with the caveat that when used on the command line, they must come after the .. option:: md_per_io_size=int : [io_uring_cmd] [xnvme] - Size in bytes for separate metadata buffer per IO. Default: 0. + Size in bytes for separate metadata buffer per IO. For io_uring_cmd + these buffers are allocated using malloc regardless of what is set for + :option:`iomem`. Default: 0. .. option:: pi_act=int : [io_uring_cmd] [xnvme] diff --git a/engines/io_uring.c b/engines/io_uring.c index 79eacbc4..facc967f 100644 --- a/engines/io_uring.c +++ b/engines/io_uring.c @@ -1353,14 +1353,8 @@ static int fio_ioring_init(struct thread_data *td) md_size += page_mask + td->o.mem_align; if (td->o.mem_align && td->o.mem_align > page_size) md_size += td->o.mem_align - page_size; - if (td->o.mem_type == MEM_MALLOC) { - ld->md_buf = malloc(md_size); - if (!ld->md_buf) { - free(ld); - return 1; - } - } else { - log_err("fio: Only iomem=malloc or mem=malloc is supported\n"); + ld->md_buf = malloc(md_size); + if (!ld->md_buf) { free(ld); return 1; } diff --git a/fio.1 b/fio.1 index 53fb7849..3c5f02b3 100644 --- a/fio.1 +++ b/fio.1 @@ -2361,7 +2361,9 @@ this option is specified, the option \fBplids\fP or \fBfdp_pli\fP will be ignore .RE .TP .BI (io_uring_cmd,xnvme)md_per_io_size \fR=\fPint -Size in bytes for separate metadata buffer per IO. Default: 0. +Size in bytes for separate metadata buffer per IO. For io_uring_cmd these +buffers are allocated using malloc regardless of what is set for \fBiomem\fR. +Default: 0. .TP .BI (io_uring_cmd,xnvme)pi_act \fR=\fPint Action to take when nvme namespace is formatted with protection information.