From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Matthew Wilcox <matthew.r.wilcox@intel.com>
Cc: Jan Kara <jack@suse.cz>, Dave Chinner <david@fromorbit.com>,
Ross Zwisler <ross.zwisler@linux.intel.com>,
Matthew Wilcox <willy@linux.intel.com>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/2] mm,fs,dax: Change ->pmd_fault to ->huge_fault
Date: Wed, 27 Jan 2016 10:47:24 -0700 [thread overview]
Message-ID: <20160127174724.GA17879@linux.intel.com> (raw)
In-Reply-To: <1453867708-3999-2-git-send-email-matthew.r.wilcox@intel.com>
On Tue, Jan 26, 2016 at 11:08:27PM -0500, Matthew Wilcox wrote:
> From: Matthew Wilcox <willy@linux.intel.com>
>
> In preparation for adding the ability to handle PUD pages, convert
> ->pmd_fault to ->huge_fault. huge_fault() takes a vm_fault structure
> instead of separate (address, pmd, flags) parameters. The vm_fault
> structure is extended to include a union of the different page table
> pointers that may be needed, and three flag bits are reserved to indicate
> which type of pointer is in the union.
>
> The DAX fault handlers are unified into one entry point, meaning that
> the filesystems can be largely unconcerned with what size of fault they
> are handling. ext4 needs to know in order to reserve enough blocks in
> the journal, but ext2 and xfs are oblivious.
>
> The existing dax_fault and dax_mkwrite had no callers, so rename the
> __dax_fault and __dax_mkwrite to lose the initial underscores.
>
> Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
> ---
> Documentation/filesystems/dax.txt | 12 +++--
> fs/block_dev.c | 10 +---
> fs/dax.c | 97 +++++++++++++--------------------------
> fs/ext2/file.c | 27 ++---------
> fs/ext4/file.c | 56 +++++++---------------
> fs/xfs/xfs_file.c | 25 +++++-----
> fs/xfs/xfs_trace.h | 2 +-
> include/linux/dax.h | 17 -------
> include/linux/mm.h | 20 ++++++--
> mm/memory.c | 20 ++++++--
> 10 files changed, 102 insertions(+), 184 deletions(-)
>
> diff --git a/Documentation/filesystems/dax.txt b/Documentation/filesystems/dax.txt
> index 7bde640..2fe9e74 100644
> --- a/Documentation/filesystems/dax.txt
> +++ b/Documentation/filesystems/dax.txt
> @@ -49,6 +49,7 @@ These block devices may be used for inspiration:
> - axonram: Axon DDR2 device driver
> - brd: RAM backed block device driver
> - dcssblk: s390 dcss block device driver
> +- pmem: NV-DIMM Persistent Memory driver
>
>
> Implementation Tips for Filesystem Writers
> @@ -61,9 +62,9 @@ Filesystem support consists of
> dax_do_io() instead of blockdev_direct_IO() if S_DAX is set
> - implementing an mmap file operation for DAX files which sets the
> VM_MIXEDMAP and VM_HUGEPAGE flags on the VMA, and setting the vm_ops to
> - include handlers for fault, pmd_fault and page_mkwrite (which should
> - probably call dax_fault(), dax_pmd_fault() and dax_mkwrite(), passing the
> - appropriate get_block() callback)
> + include handlers for fault, huge_fault and page_mkwrite (which should
> + probably call dax_fault() and dax_mkwrite(), passing the appropriate
> + get_block() callback)
You might also want to mention that filesystems need to add a handler for
dax_pfn_mkwrite(), which is now necessary so that we can properly track dirty
radix tree entries due to the DAX fsync/msync changes.
I also noticed that there is still a mention of __dax_fault() in the comment
block in dax_pfn_mkwrite(), which should probably just
s/__dax_fault()/dax_fault()/.
Otherwise this looks great - thanks for getting rid of the dead wrappers!
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
next prev parent reply other threads:[~2016-01-27 17:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-27 4:08 [PATCH 0/2] Fix dax races between page faults RFC only Matthew Wilcox
2016-01-27 4:08 ` [PATCH 1/2] mm,fs,dax: Change ->pmd_fault to ->huge_fault Matthew Wilcox
2016-01-27 5:48 ` kbuild test robot
2016-01-27 17:47 ` Ross Zwisler [this message]
2016-01-28 12:17 ` Jan Kara
2016-01-29 14:31 ` Matthew Wilcox
2016-01-27 4:08 ` [PATCH 2/2] dax: Giant hack Matthew Wilcox
2016-01-28 13:10 ` Jan Kara
2016-01-28 21:23 ` Dave Chinner
2016-01-29 22:29 ` Jared Hulbert
[not found] ` <CAOxpaSU_JgkeS=u61zxWTdP5hXymBkUsvkjkwNzm6XVig9y8RQ@mail.gmail.com>
2016-01-27 6:18 ` [PATCH 0/2] Fix dax races between page faults RFC only Matthew Wilcox
2016-02-01 21:25 ` Ross Zwisler
2016-01-28 12:48 ` Jan Kara
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=20160127174724.GA17879@linux.intel.com \
--to=ross.zwisler@linux.intel.com \
--cc=david@fromorbit.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=matthew.r.wilcox@intel.com \
--cc=willy@linux.intel.com \
/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).