Thread (29 messages) 29 messages, 4 authors, 2021-02-03

Re: [PATCH v4 1/9] hugetlb: Pass vma into huge_pte_alloc()

From: Mike Kravetz <hidden>
Date: 2021-02-01 21:40:52
Also in: linux-fsdevel, lkml

On 1/28/21 3:42 PM, Axel Rasmussen wrote:
From: Peter Xu <peterx@redhat.com>

It is a preparation work to be able to behave differently in the per
architecture huge_pte_alloc() according to different VMA attributes.

Signed-off-by: Peter Xu <peterx@redhat.com>
[axelrasmussen@google.com: fixed typo in arch/mips/mm/hugetlbpage.c]
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
---
 arch/arm64/mm/hugetlbpage.c   | 2 +-
 arch/ia64/mm/hugetlbpage.c    | 3 ++-
 arch/mips/mm/hugetlbpage.c    | 4 ++--
 arch/parisc/mm/hugetlbpage.c  | 2 +-
 arch/powerpc/mm/hugetlbpage.c | 3 ++-
 arch/s390/mm/hugetlbpage.c    | 2 +-
 arch/sh/mm/hugetlbpage.c      | 2 +-
 arch/sparc/mm/hugetlbpage.c   | 2 +-
 include/linux/hugetlb.h       | 2 +-
 mm/hugetlb.c                  | 6 +++---
 mm/userfaultfd.c              | 2 +-
 11 files changed, 16 insertions(+), 14 deletions(-)
Sorry for the delay in reviewing.

huge_pmd_share() will do a find_vma() to get the vma.  So, it would be
'possible' to not add an extra argument to huge_pmd_alloc() and simply
do the uffd_disable_huge_pmd_share() check inside vma_shareable.  This
would reduce the amount of modified code, but would not be as efficient.
I prefer passing the vma argument as is done here.

Reviewed-by: Mike Kravetz <redacted>

-- 
Mike Kravetz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help