Re: [PATCH v3] hugetlb: simplify hugetlb handling in follow_page_mask

2022-10-28 Thread Peter Xu
On Fri, Oct 28, 2022 at 08:27:57AM -0700, Mike Kravetz wrote: > On 10/27/22 15:34, Peter Xu wrote: > > On Wed, Oct 26, 2022 at 05:34:04PM -0700, Mike Kravetz wrote: > > > On 10/26/22 17:59, Peter Xu wrote: > > > > If we want to use the vma read lock to protect here as the slow gup path, > > then p

Re: [PATCH v3] hugetlb: simplify hugetlb handling in follow_page_mask

2022-10-28 Thread Mike Kravetz
On 10/27/22 15:34, Peter Xu wrote: > On Wed, Oct 26, 2022 at 05:34:04PM -0700, Mike Kravetz wrote: > > On 10/26/22 17:59, Peter Xu wrote: > > If we want to use the vma read lock to protect here as the slow gup path, > then please check again with below [1] - I think we'll also need to protect > it

Re: [PATCH v3] hugetlb: simplify hugetlb handling in follow_page_mask

2022-10-27 Thread Peter Xu
On Wed, Oct 26, 2022 at 05:34:04PM -0700, Mike Kravetz wrote: > On 10/26/22 17:59, Peter Xu wrote: > > Hi, Mike, > > > > On Sun, Sep 18, 2022 at 07:13:48PM -0700, Mike Kravetz wrote: > > > +struct page *hugetlb_follow_page_mask(struct vm_area_struct *vma, > > > + unsigned l

Re: [PATCH v3] hugetlb: simplify hugetlb handling in follow_page_mask

2022-10-26 Thread Mike Kravetz
On 10/26/22 17:59, Peter Xu wrote: > Hi, Mike, > > On Sun, Sep 18, 2022 at 07:13:48PM -0700, Mike Kravetz wrote: > > +struct page *hugetlb_follow_page_mask(struct vm_area_struct *vma, > > + unsigned long address, unsigned int flags) > > +{ > > + struct hstate *h = hstat

Re: [PATCH v3] hugetlb: simplify hugetlb handling in follow_page_mask

2022-10-26 Thread Peter Xu
Hi, Mike, On Sun, Sep 18, 2022 at 07:13:48PM -0700, Mike Kravetz wrote: > +struct page *hugetlb_follow_page_mask(struct vm_area_struct *vma, > + unsigned long address, unsigned int flags) > +{ > + struct hstate *h = hstate_vma(vma); > + struct mm_struct *mm = vm

Re: [PATCH v3] hugetlb: simplify hugetlb handling in follow_page_mask

2022-09-21 Thread Baolin Wang
On 9/19/2022 10:13 AM, Mike Kravetz wrote: During discussions of this series [1], it was suggested that hugetlb handling code in follow_page_mask could be simplified. At the beginning of follow_page_mask, there currently is a call to follow_huge_addr which 'may' handle hugetlb pages. ia64 is

Re: [PATCH v3] hugetlb: simplify hugetlb handling in follow_page_mask

2022-09-19 Thread David Hildenbrand
On 19.09.22 04:13, Mike Kravetz wrote: During discussions of this series [1], it was suggested that hugetlb handling code in follow_page_mask could be simplified. At the beginning of follow_page_mask, there currently is a call to follow_huge_addr which 'may' handle hugetlb pages. ia64 is the on

[PATCH v3] hugetlb: simplify hugetlb handling in follow_page_mask

2022-09-18 Thread Mike Kravetz
During discussions of this series [1], it was suggested that hugetlb handling code in follow_page_mask could be simplified. At the beginning of follow_page_mask, there currently is a call to follow_huge_addr which 'may' handle hugetlb pages. ia64 is the only architecture which provides a follow_h