From: Jens Axboe <axboe@kernel.dk>
To: Keith Busch <keith.busch@intel.com>, linux-block@vger.kernel.org
Subject: Re: [PATCH] fio: Add advise THP option to mmap engine
Date: Wed, 17 Apr 2019 16:01:28 -0600 [thread overview]
Message-ID: <8a288283-e4c1-6fdc-6884-d98cfd246492@kernel.dk> (raw)
In-Reply-To: <20190417212816.6460-1-keith.busch@intel.com>
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
next prev parent reply other threads:[~2019-04-17 22:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-17 21:28 [PATCH] fio: Add advise THP option to mmap engine Keith Busch
2019-04-17 22:01 ` Jens Axboe [this message]
2019-04-17 22:01 ` Keith Busch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8a288283-e4c1-6fdc-6884-d98cfd246492@kernel.dk \
--to=axboe@kernel.dk \
--cc=keith.busch@intel.com \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox