Re: [PATCH 3/7] mm/hugetlb: Add page_mask for hugetlb_follow_page_mask()
From: Peter Xu
Date: Mon Jun 19 2023 - 17:44:38 EST
On Tue, Jun 13, 2023 at 05:53:42PM -0400, Peter Xu wrote:
> @@ -6506,6 +6507,7 @@ struct page *hugetlb_follow_page_mask(struct vm_area_struct *vma,
> * because we hold the ptl lock and have verified pte_present().
> */
> WARN_ON_ONCE(try_grab_page(page, flags));
> + *page_mask = huge_page_mask(h);
Sorry, I was wrong this line. It should be:
*page_mask = ~huge_page_mask(h) >> PAGE_SHIFT;
This can be exposed if we bypass fast-gup and also specify pin npages>1.
Probably overlooked in my initial round and I'd guess fast-gup just all
succeeded there..
I'll temporarily drop the R-bs for this patch, so reviewers can have
another closer look in this one.
--
Peter Xu