From: Christoph Hellwig <hch@lst.de>
To: Ross Zwisler <ross.zwisler@linux.intel.com>,
Christoph Hellwig <hch@lst.de>, Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org, linux-nvdimm@lists.01.org,
linux-xfs@vger.kernel.org,
Dan Williams <dan.j.williams@intel.com>
Subject: Re: [PATCH 2/3] xfs: consolidate the various page fault handlers
Date: Fri, 25 Aug 2017 09:15:38 +0200 [thread overview]
Message-ID: <20170825071538.GB9191@lst.de> (raw)
In-Reply-To: <20170824212942.GB20489@linux.intel.com>
On Thu, Aug 24, 2017 at 03:29:42PM -0600, Ross Zwisler wrote:
> > + /* DAX can shortcut the normal fault path on write faults! */
>
> Does this comment still make sense for the PMD case?
I kept the code as before, and also kept the comment intent as-is
(although I shortend it a bit).
> Here's what I *think* it
> means: For DAX write faults we make the PTE writeable in the ->fault() code
> and don't rely on a follow-up ->page_mkwrite() call. This happens in
> do_shared_fault(), where we return before the ->page_mkwrite() call because
> the DAX write fault returns VM_FAULT_NOPAGE.
>
> This is in contrast to the normal page fault case where the ->fault() call
> ends up calling filemap_fault(), which populates the page read-only, and then
> do_shared_fault() does a follow-up ->page_mkwrite() call which makes the page
> writable.
>
> First, is the above correct? :)
Yes.
> If so, I think the comment doesn't make
> sense for the PMD fault path because in that case we always make the PMD
> writeable in the first ->huge_fault() call, as there is no follow-up
> *_mkwrite()?
Well, there is non-DAX huge_fault case. It still is different from the
normal non-hugepage fault case, so the comment still makes some sense,
but maybe I should remove the DAX. That being said if we eventually
get huge page page cache support (patches are on the list) I suspect
they'll work like the normal fault path, not the DAX path.
> > static int
>
> STATIC
We're phasing that out, so I should probably remove it where it's
currently newly added/moved in the patch.
> I see that this size check is gone from the new code, and we now rely on the
> equivalent check in dax_iomap_fault(). Nice.
Yes. And I actually used to mention that in the changelog, but it got
lost. I'll re-add it.
> I wonder if pe_size would be more readable as a string via __print_symbolic()
> so we see "pe_size PMD" instead of "pe_size 1" from enum page_entry_size?
Probably. I was just lazy :) If I want to go all the way I could also
use a __print_flags for the FAULT_FLAG_* flags.
next prev parent reply other threads:[~2017-08-25 7:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-24 15:22 synchronous page faults for XFS Christoph Hellwig
2017-08-24 15:22 ` [PATCH 1/3] iomap: return VM_FAULT_* codes from iomap_page_mkwrite Christoph Hellwig
2017-08-24 19:26 ` Ross Zwisler
2017-08-25 7:10 ` Christoph Hellwig
2017-08-24 15:22 ` [PATCH 2/3] xfs: consolidate the various page fault handlers Christoph Hellwig
2017-08-24 21:29 ` Ross Zwisler
2017-08-25 7:15 ` Christoph Hellwig [this message]
2017-08-28 17:50 ` Ross Zwisler
2017-08-28 17:52 ` Christoph Hellwig
2017-08-28 20:09 ` Ross Zwisler
2017-08-24 15:22 ` [PATCH 3/3] xfs: support for synchronous DAX faults Christoph Hellwig
2017-08-24 21:42 ` Ross Zwisler
2017-08-25 0:13 ` Dan Williams
2017-08-25 6:50 ` Christoph Hellwig
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=20170825071538.GB9191@lst.de \
--to=hch@lst.de \
--cc=dan.j.williams@intel.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=linux-xfs@vger.kernel.org \
--cc=ross.zwisler@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).