Re: [PATCH v2 3/4] dax: stop using VM_MIXEDMAP for dax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 3, 2017 at 1:09 AM, Jan Kara <jack@xxxxxxx> 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.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux