From: Matthew Wilcox <willy@linux.intel.com>
To: Jan Kara <jack@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Toshi Kani <toshi.kani@hpe.com>,
dan.j.williams@intel.com, viro@zeniv.linux.org.uk,
ross.zwisler@linux.intel.com, kirill.shutemov@linux.intel.com,
david@fromorbit.com, tytso@mit.edu, adilger.kernel@dilger.ca,
linux-nvdimm@ml01.01.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings
Date: Tue, 19 Apr 2016 14:23:47 -0400 [thread overview]
Message-ID: <20160419182347.GA29068@linux.intel.com> (raw)
In-Reply-To: <20160418202610.GA17889@quack2.suse.cz>
On Mon, Apr 18, 2016 at 10:26:10PM +0200, Jan Kara wrote:
> On Fri 15-04-16 22:05:31, Andrew Morton wrote:
> > On Thu, 14 Apr 2016 10:48:29 -0600 Toshi Kani <toshi.kani@hpe.com> wrote:
> >
> > > When CONFIG_FS_DAX_PMD is set, DAX supports mmap() using pmd page
> > > size. This feature relies on both mmap virtual address and FS
> > > block (i.e. physical address) to be aligned by the pmd page size.
> > > Users can use mkfs options to specify FS to align block allocations.
> > > However, aligning mmap address requires code changes to existing
> > > applications for providing a pmd-aligned address to mmap().
> > >
> > > For instance, fio with "ioengine=mmap" performs I/Os with mmap() [1].
> > > It calls mmap() with a NULL address, which needs to be changed to
> > > provide a pmd-aligned address for testing with DAX pmd mappings.
> > > Changing all applications that call mmap() with NULL is undesirable.
> > >
> > > This patch-set extends filesystems to align an mmap address for
> > > a DAX file so that unmodified applications can use DAX pmd mappings.
> >
> > Matthew sounded unconvinced about the need for this patchset, but I
> > must say that
> >
> > : The point is that we do not need to modify existing applications for using
> > : DAX PMD mappings.
> > :
> > : For instance, fio with "ioengine=mmap" performs I/Os with mmap().
> > : https://github.com/caius/fio/blob/master/engines/mmap.c
> > :
> > : With this change, unmodified fio can be used for testing with DAX PMD
> > : mappings. There are many examples like this, and I do not think we want
> > : to modify all applications that we want to evaluate/test with.
> >
> > sounds pretty convincing?
> >
> >
> > And if we go ahead with this, it looks like 4.7 material to me - it
> > affects ABI and we want to get that stabilized asap. What do people
> > think?
>
> So I think Mathew didn't question the patch set as a whole. I think we all
> agree that we should align the virtual address we map to so that PMD
> mappings can be used. What Mathew was questioning was whether we really
> need to play tricks when logical offset in the file where mmap is starting
> is not aligned (and similarly for map length). Whether allowing PMD
> mappings for unaligned file offsets is worth the complication is IMO a
> valid question.
I was questioning the approach as a whole ... since we have userspace
already doing this in the form of NVML, do we really need the kernel to
do this for us?
Now, a further wrinkle. We have two competing patch sets (from Kirill
and Hugh) which are going to give us THP for page cache filesystems.
I would suggest that this is not DAX functionality but rather VFS
functionality to opportunistically align all mmaps on files which are
reasonably likely to be able to use THP.
I hadn't thought about this until earlier today, and I'm sorry I didn't
raise it further. Perhaps we can do a lightning session on this later
today at LSFMM since all six (Toshi, Andrew, Jan, Hugh, Kirill and myself)
are here.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-04-19 18:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-14 16:48 [PATCH v3 0/2] Align mmap address for DAX pmd mappings Toshi Kani
2016-04-14 16:48 ` [PATCH v3 1/2] dax: add dax_get_unmapped_area for " Toshi Kani
2016-04-18 20:47 ` Jan Kara
2016-04-19 2:36 ` Toshi Kani
2016-04-14 16:48 ` [PATCH v3 2/2] ext2/4, xfs, blk: call dax_get_unmapped_area() for DAX " Toshi Kani
2016-04-16 5:05 ` [PATCH v3 0/2] Align mmap address " Andrew Morton
2016-04-18 20:26 ` Jan Kara
2016-04-19 18:23 ` Matthew Wilcox [this message]
2016-04-21 3:10 ` Toshi Kani
2016-04-21 7:06 ` Matthew Wilcox
2016-04-21 20:21 ` Mike Kravetz
2016-04-21 23:43 ` Toshi Kani
2016-04-22 0:22 ` Matthew Wilcox
2016-04-22 0:59 ` Toshi Kani
2016-04-21 23:35 ` Toshi Kani
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=20160419182347.GA29068@linux.intel.com \
--to=willy@linux.intel.com \
--cc=adilger.kernel@dilger.ca \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=david@fromorbit.com \
--cc=jack@suse.cz \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@ml01.01.org \
--cc=ross.zwisler@linux.intel.com \
--cc=toshi.kani@hpe.com \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).