From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17F35C32751 for ; Wed, 31 Jul 2019 17:59:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E110B206B8 for ; Wed, 31 Jul 2019 17:59:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="aAVijrZ1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727768AbfGaR7U (ORCPT ); Wed, 31 Jul 2019 13:59:20 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:38364 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726232AbfGaR7T (ORCPT ); Wed, 31 Jul 2019 13:59:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=SFbQnaoqsadI4zyK9FmZVb5jRGBvcMhtkf9xAvnYNi0=; b=aAVijrZ1LE/V5A1EQp4VZOkJM ohKRVqFkOOvbCn7csYPUyuYkpmOfxJ3MV0Is8wwvxFqh7Fs0TkJT6uMH51byCzcUZSbXTgqabZKTJ riUU+p7elN67dDAFSpeLVY6pOmWJbb2+bEKUbST3ls7qbj8AFNJ3xs5KYln9zmwP1pXyoghgZH+VK 7NMQXTsEQG0TlgK6aNSp0h7O3rO2anqBNE2bnMoPlrSy7/O+MdQLi/QhGoUbg7I62V7l8FUSETVKQ WpFYlO/3KY/y4WTIAwbTRJXEaAAJoH/9iI0cKTeeV1+hUhy4WMpntPNj78/Z+xsf1gPn0M86snBjr q4sn+qwDQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hsssh-0006Re-8U; Wed, 31 Jul 2019 17:59:19 +0000 Date: Wed, 31 Jul 2019 10:59:19 -0700 From: Matthew Wilcox To: Song Liu Cc: William Kucharski , Linux-Fsdevel , Christoph Hellwig , linux-xfs@vger.kernel.org, Linux-MM Subject: Re: [RFC 0/2] iomap & xfs support for large pages Message-ID: <20190731175919.GF4700@bombadil.infradead.org> References: <20190731171734.21601-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed, Jul 31, 2019 at 10:50:40AM -0700, Song Liu wrote: > On Wed, Jul 31, 2019 at 10:17 AM Matthew Wilcox wrote: > > > > From: "Matthew Wilcox (Oracle)" > > > > 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)