projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] Support for mmap of hugetlb files as memory backing
[fio.git]
/
fio.c
diff --git
a/fio.c
b/fio.c
index 3ffe1e17a601eebc54debbb1f51580a969b56bc1..8a4a44dc902f0f0dde0695deceaefb1dbab9ae4a 100644
(file)
--- a/
fio.c
+++ b/
fio.c
@@
-507,7
+507,12
@@
static int init_io_u(struct thread_data *td)
max_units = td->iodepth;
max_bs = max(td->max_bs[DDIR_READ], td->max_bs[DDIR_WRITE]);
max_units = td->iodepth;
max_bs = max(td->max_bs[DDIR_READ], td->max_bs[DDIR_WRITE]);
- td->orig_buffer_size = max_bs * max_units + MASK;
+ td->orig_buffer_size = max_bs * max_units;
+
+ if (td->mem_type == MEM_SHMHUGE || td->mem_type == MEM_MMAPHUGE)
+ td->orig_buffer_size = (td->orig_buffer_size + FIO_HUGE_PAGE - 1) & ~(FIO_HUGE_PAGE - 1);
+ else
+ td->orig_buffer_size += MASK;
if (allocate_io_mem(td))
return 1;
if (allocate_io_mem(td))
return 1;