Add support for the iomem_align option
This allows detailed control of the alignment of the IO buffers
that fio uses.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/memory.c b/memory.c
index d3ef2cb..00339e4 100644
--- a/memory.c
+++ b/memory.c
@@ -188,8 +188,12 @@
return 0;
total_mem = td->orig_buffer_size;
- if (td->o.odirect)
+
+ if (td->o.odirect || td->o.mem_align) {
total_mem += page_mask;
+ if (td->o.mem_align && td->o.mem_align > page_size)
+ total_mem += td->o.mem_align - page_size;
+ }
if (td->o.mem_type == MEM_MALLOC)
ret = alloc_mem_malloc(td, total_mem);