Re: [PATCH] userfaultfd: hugetlbfs: add UFFDIO_COPY support for shared mappings
From: Kirill A. Shutemov
Date: Tue Feb 21 2017 - 08:26:07 EST
On Thu, Feb 16, 2017 at 07:41:00PM +0100, Andrea Arcangeli wrote:
> Kirill what's your take on making the registration checks stricter?
> If we would add a vma_is_anonymous_not_in_fault implemented like above
> vma_can_userfault would just need a
> s/vma_is_anonymous/vma_is_anonymous_not_in_fault/ and it would be more
> strict. khugepaged could be then converted to use it too instead of
> hardcoding this vm_flags check. Unless I'm mistaken I would consider
> such a change to the registration code, purely a cleanup to add a more
> strict check.
[sorry for later response]
I think more strict vma_is_anonymous() is a good thing.
But I don't see a point introducing one more helper. Let's just make the
existing helper work better.
--
Kirill A. Shutemov