From: Dan Williams <dan.j.williams@intel.com>
To: Jan Kara <jack@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
Linux MM <linux-mm@kvack.org>, Jeff Moyer <jmoyer@redhat.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Ross Zwisler <ross.zwisler@linux.intel.com>,
Christoph Hellwig <hch@lst.de>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: Re: [PATCH v2 3/4] dax: stop using VM_MIXEDMAP for dax
Date: Tue, 3 Oct 2017 10:29:24 -0700 [thread overview]
Message-ID: <CAPcyv4hOwKRMJ15GnPt7Qdtx2NiJQd-e8ooFc6SSQ=hoA58oUw@mail.gmail.com> (raw)
In-Reply-To: <20171003080901.GD11879@quack2.suse.cz>
On Tue, Oct 3, 2017 at 1:09 AM, Jan Kara <jack@suse.cz> wrote:
> On Thu 28-09-17 18:21:18, Dan Williams wrote:
>> VM_MIXEDMAP is used by dax to direct mm paths like vm_normal_page() that
>> the memory page it is dealing with is not typical memory from the linear
>> map. The get_user_pages_fast() path, since it does not resolve the vma,
>> is already using {pte,pmd}_devmap() as a stand-in for VM_MIXEDMAP, so we
>> use that as a VM_MIXEDMAP replacement in some locations. In the cases
>> where there is no pte to consult we fallback to using vma_is_dax() to
>> detect the VM_MIXEDMAP special case.
>
> Well, I somewhat dislike the vma_is_dax() checks sprinkled around. That
> seems rather errorprone (easy to forget about it when adding new check
> somewhere). Can we possibly also create a helper vma_is_special() (or some
> other name) which would do ((vma->vm_flags & VM_SPECIAL) || vma_is_dax(vma)
> || is_vm_hugetlb_page(vma)) and then use it in all those places?
Yes, I can take a look at that... I shied away from it initially since
it does not appear that "vma_is_special()" paths are symmetric in
terms of all the conditions they check, but perhaps I can start small
with the ones that are common. I'll break that conversion out into a
lead-in cleanup patch.
--
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:[~2017-10-03 17:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-29 1:21 [PATCH v2 0/4] dax: require 'struct page' and other fixups Dan Williams
2017-09-29 1:21 ` [PATCH v2 1/4] dax: quiet bdev_dax_supported() Dan Williams
2017-09-29 1:21 ` [PATCH v2 2/4] dax: disable filesystem dax on devices that do not map pages Dan Williams
2017-09-29 1:21 ` [PATCH v2 3/4] dax: stop using VM_MIXEDMAP for dax Dan Williams
2017-10-03 8:09 ` Jan Kara
2017-10-03 17:29 ` Dan Williams [this message]
2017-09-29 1:21 ` [PATCH v2 4/4] dax: stop using VM_HUGEPAGE " Dan Williams
2017-10-03 8:12 ` Jan Kara
2017-10-01 7:57 ` [PATCH v2 0/4] dax: require 'struct page' and other fixups Christoph Hellwig
2017-10-01 17:58 ` Dan Williams
2017-10-01 21:11 ` Dave Chinner
2017-10-01 21:22 ` Dan Williams
2017-10-01 21:23 ` Dan Williams
2017-10-01 21:59 ` Dave Chinner
2017-10-01 23:15 ` Dan Williams
2017-10-02 22:47 ` Andrew Morton
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='CAPcyv4hOwKRMJ15GnPt7Qdtx2NiJQd-e8ooFc6SSQ=hoA58oUw@mail.gmail.com' \
--to=dan.j.williams@intel.com \
--cc=akpm@linux-foundation.org \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=jmoyer@redhat.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.org \
--cc=mhocko@suse.com \
--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