Re: [PATCH v3 1/4] hugetlb: Pass vma into huge_pte_alloc() and huge_pmd_share()

2021-02-18 Thread Peter Xu
On Thu, Feb 18, 2021 at 02:38:18PM -0800, Mike Kravetz wrote: > I thought the error was caused by not deleting the line > > pte_t *huge_pte_alloc(struct mm_struct *mm, > > when adding > > pte_t *huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma, > > as above. Sorry ab

Re: [PATCH v3 1/4] hugetlb: Pass vma into huge_pte_alloc() and huge_pmd_share()

2021-02-18 Thread Mike Kravetz
On 2/18/21 2:27 PM, Peter Xu wrote: > On Thu, Feb 18, 2021 at 02:13:52PM -0800, Mike Kravetz wrote: >> On 2/18/21 1:54 PM, Peter Xu wrote: >>> It is a preparation work to be able to behave differently in the per >>> architecture huge_pte_alloc() according to different VMA attributes. >> >>> diff --

Re: [PATCH v3 1/4] hugetlb: Pass vma into huge_pte_alloc() and huge_pmd_share()

2021-02-18 Thread Peter Xu
On Thu, Feb 18, 2021 at 02:13:52PM -0800, Mike Kravetz wrote: > On 2/18/21 1:54 PM, Peter Xu wrote: > > It is a preparation work to be able to behave differently in the per > > architecture huge_pte_alloc() according to different VMA attributes. > > > diff --git a/arch/sparc/mm/hugetlbpage.c b/arc

Re: [PATCH v3 1/4] hugetlb: Pass vma into huge_pte_alloc() and huge_pmd_share()

2021-02-18 Thread Mike Kravetz
On 2/18/21 1:54 PM, Peter Xu wrote: > It is a preparation work to be able to behave differently in the per > architecture huge_pte_alloc() according to different VMA attributes. > diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c > index ad4b42f04988..97e0824fdbe7 100644 > ---

[PATCH v3 1/4] hugetlb: Pass vma into huge_pte_alloc() and huge_pmd_share()

2021-02-18 Thread Peter Xu
It is a preparation work to be able to behave differently in the per architecture huge_pte_alloc() according to different VMA attributes. Pass it deeper into huge_pmd_share() so that we can avoid the find_vma() call. Suggested-by: Mike Kravetz Reviewed-by: Mike Kravetz Reviewed-by: Axel Rasmuss