Skip to content

Commit

Permalink
engines/io_uring_cmd: disable iomem=malloc check for metadata
Browse files Browse the repository at this point in the history
Before this patch, the io_uring_cmd ioengine would check that
iomem=malloc (the default) before allocating memory for metadata
buffers. If the user had selected a different option, fio would abort
the job with an error message.

This patch removes this check. We do not need to restrict users to
iomem=malloc for io_uring_cmd workloads involving protection
information. Users may wish to use huge pages for LBA data in order to
submit larger IOs. Since metadata buffers will be smaller they can still
use regular pages.

Reported-by: 전규범 <gyubeom.jeon@samsung.com>
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
  • Loading branch information
vincentkfu committed Nov 22, 2024
1 parent f2415d7 commit d78f2f3
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions engines/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d78f2f3

Please sign in to comment.