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 87136141b0e34770851dbab53a942d9774eb6f48..8a4a44dc902f0f0dde0695deceaefb1dbab9ae4a 100644
(file)
--- a/
fio.c
+++ b/
fio.c
@@
-509,8
+509,8
@@
static int init_io_u(struct thread_data *td)
max_bs = max(td->max_bs[DDIR_READ], td->max_bs[DDIR_WRITE]);
td->orig_buffer_size = max_bs * max_units;
max_bs = max(td->max_bs[DDIR_READ], td->max_bs[DDIR_WRITE]);
td->orig_buffer_size = max_bs * max_units;
- if (td->mem_type == MEM_SHMHUGE)
- td->orig_buffer_size = (td->orig_buffer_size + FIO_HUGE_PAGE - 1) & ~
FIO_HUGE_PAGE
;
+ 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;
else
td->orig_buffer_size += MASK;