On 4/17/19 3:28 PM, Keith Busch wrote:
> The transparent hugepage Linux-specific memory advisory has potentially
> significant implications for how the memory management behaves. Add a
> new mmap specific option that enables private TLP mmap mode when set so
> we can test running fio with anonymous memory (i.e. mmap /dev/zero).
I'm fine with this, but the usual approach to platform stuff like this
is to have
#define FIO_HAVE_THP
or similar in the os/os-linux.h file and then have:
#if FIO_OS==os_linux
if (o->thp)
madvise(io_u->mmap_data, fmd->mmap_sz, MADV_HUGEPAGE);
#endif
#if defined(FIO_HAVE_THP)
...
#endif
instead. Since we need MADV_HUGEPAGE as well, might even make sense to
just have this be a configure check instead...
--
Jens Axboe