public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <keith.busch@intel.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH] fio: Add advise THP option to mmap engine
Date: Wed, 17 Apr 2019 16:01:19 -0600	[thread overview]
Message-ID: <20190417220119.GB6176@localhost.localdomain> (raw)
In-Reply-To: <8a288283-e4c1-6fdc-6884-d98cfd246492@kernel.dk>

On Wed, Apr 17, 2019 at 04:01:28PM -0600, Jens Axboe wrote:
> 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...

Sounds good. I like to fit in with the local customs, so will take
another shot at this.

      reply	other threads:[~2019-04-17 22:07 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
2019-04-17 22:01   ` Keith Busch [this message]

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=20190417220119.GB6176@localhost.localdomain \
    --to=keith.busch@intel.com \
    --cc=axboe@kernel.dk \
    --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