mbox series

[RFC,0/2] iomap & xfs support for large pages

Message ID 20190731171734.21601-1-willy@infradead.org (mailing list archive)
Headers show
Series iomap & xfs support for large pages | expand

Message

Matthew Wilcox July 31, 2019, 5:17 p.m. UTC
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>

Christoph sent me a patch a few months ago called "XFS THP wip".
I've redone it based on current linus tree, plus the page_size() /
compound_nr() / page_shift() patches currently found in -mm.  I fixed
the logic bugs that I noticed in his patch and may have introduced some
of my own.  I have only compile tested this code.

Matthew Wilcox (Oracle) (2):
  iomap: Support large pages
  xfs: Support large pages

 fs/iomap/buffered-io.c | 82 ++++++++++++++++++++++++++----------------
 fs/xfs/xfs_aops.c      | 37 +++++++++----------
 include/linux/iomap.h  |  2 +-
 3 files changed, 72 insertions(+), 49 deletions(-)

Comments

Song Liu July 31, 2019, 5:50 p.m. UTC | #1
On Wed, Jul 31, 2019 at 10:17 AM Matthew Wilcox <willy@infradead.org> wrote:
>
> From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
>
> Christoph sent me a patch a few months ago called "XFS THP wip".
> I've redone it based on current linus tree, plus the page_size() /
> compound_nr() / page_shift() patches currently found in -mm.  I fixed
> the logic bugs that I noticed in his patch and may have introduced some
> of my own.  I have only compile tested this code.

Would Bill's set work on XFS with this set?

Thanks,
Song

>
> Matthew Wilcox (Oracle) (2):
>   iomap: Support large pages
>   xfs: Support large pages
>
>  fs/iomap/buffered-io.c | 82 ++++++++++++++++++++++++++----------------
>  fs/xfs/xfs_aops.c      | 37 +++++++++----------
>  include/linux/iomap.h  |  2 +-
>  3 files changed, 72 insertions(+), 49 deletions(-)
>
> --
> 2.20.1
>
Matthew Wilcox July 31, 2019, 5:59 p.m. UTC | #2
On Wed, Jul 31, 2019 at 10:50:40AM -0700, Song Liu wrote:
> On Wed, Jul 31, 2019 at 10:17 AM Matthew Wilcox <willy@infradead.org> wrote:
> >
> > From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> >
> > Christoph sent me a patch a few months ago called "XFS THP wip".
> > I've redone it based on current linus tree, plus the page_size() /
> > compound_nr() / page_shift() patches currently found in -mm.  I fixed
> > the logic bugs that I noticed in his patch and may have introduced some
> > of my own.  I have only compile tested this code.
> 
> Would Bill's set work on XFS with this set?

If there are no bugs in his code or mine ;-)

It'd also need to be wired up; something like this:

+++ b/fs/xfs/xfs_file.c
@@ -1131,6 +1131,8 @@ __xfs_filemap_fault(
        } else {
                if (write_fault)
                        ret = iomap_page_mkwrite(vmf, &xfs_iomap_ops);
+               else if (pe_size)
+                       ret = filemap_huge_fault(vmf, pe_size);
                else
                        ret = filemap_fault(vmf);
        }
@@ -1156,9 +1158,6 @@ xfs_filemap_huge_fault(
        struct vm_fault         *vmf,
        enum page_entry_size    pe_size)
 {
-       if (!IS_DAX(file_inode(vmf->vma->vm_file)))
-               return VM_FAULT_FALLBACK;
-
        /* DAX can shortcut the normal fault path on write faults! */
        return __xfs_filemap_fault(vmf, pe_size,
                        (vmf->flags & FAULT_FLAG_WRITE));

(untested)
Christoph Lameter (Ampere) Aug. 2, 2019, 2:54 p.m. UTC | #3
On Wed, 31 Jul 2019, Matthew Wilcox wrote:

> Christoph sent me a patch a few months ago called "XFS THP wip".
> I've redone it based on current linus tree, plus the page_size() /
> compound_nr() / page_shift() patches currently found in -mm.  I fixed
> the logic bugs that I noticed in his patch and may have introduced some
> of my own.  I have only compile tested this code.

Some references here to patches from a long time ago. Maybe there are
useful tidbits here ...

Variable page cache just for ramfs:
https://lkml.org/lkml/2007/4/19/261

Large blocksize support for XFS, ReiserFS and ext2
https://www.mail-archive.com/linux-fsdevel@vger.kernel.org/msg08730.html