Messages in this thread |  | | From | Jianhui Zhou <> | | Date | Wed, 11 Mar 2026 18:54:26 +0800 | | Subject | Re: [PATCH v4] mm/userfaultfd: fix hugetlb fault mutex hash calculation |
| |
On Tue, Mar 10, 2026 at 12:47:07PM -0700, jane.chu@oracle.com wrote: > Just wondering whether making the shift explicit here instead of > introducing another hugetlb helper might be sufficient? > > idx >>= huge_page_order(hstate_vma(vma));
That would work for hugetlb VMAs since both (address - vm_start) and vm_pgoff are guaranteed to be huge page aligned. However, David suggested introducing hugetlb_linear_page_index() to provide a cleaner API that mirrors linear_page_index(), so I kept this approach.
Thanks for the review!
|  |