Re: [PATCH v4] mm/userfaultfd: fix hugetlb fault mutex hash calculation
From: Mike Rapoport
Date: Wed Mar 25 2026 - 15:06:11 EST
On Wed, Mar 25, 2026 at 09:49:09AM +0100, David Hildenbrand (Arm) wrote:
> On 3/25/26 01:03, Andrew Morton wrote:
> > On Wed, 11 Mar 2026 18:54:26 +0800 Jianhui Zhou <jianhuizzzzz@xxxxxxxxx> wrote:
> >
> >> On Tue, Mar 10, 2026 at 12:47:07PM -0700, jane.chu@xxxxxxxxxx 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.
> >
> > Would anyone like to review this cc:stable patch for us?
>
> I would hope the hugetlb+userfaultfd submaintainers could have a
> detailed look! Moving them to "To:"
Wouldn't help much with something deeply buried in a thread :)
> One of the issue why this doesn't get more attention might be posting a
> new revision as reply to an old revision, which is an anti-pattern :)
Indeed.
--
Sincerely yours,
Mike.