Re: [PATCH] hugetlb: retry private VMA locking when unmapping folios
From: David Hildenbrand (Arm)
Date: Tue Oct 20 2026 - 06:57:58 EST
On 10/20/26 12:20, Daehyeon Ko wrote:
> Hi David,
>
> Yes, that makes sense.
>
> The per-index fault mutex excludes concurrent faults for the folio being
> removed, while i_mmap_rwsem keeps the VMA in the mapping tree and excludes
> concurrent page-table teardown. So the private resv_map lock is not needed
> in this path.
>
> I tested the exact diff from your message on v7.3-rc5 with KASAN+LOCKDEP.
> My unprivileged mprotect()/hole-punch reproducer completed 1,000 rounds
> (64,000 hole punches) with no KASAN, lockdep, unexpected warning, oops, or
> panic.
>
> Please consider my patch superseded by Josef's fix.
>
> One small typo in the quoted comment: "i_mmap_rwsem everybody" appears to
> be missing "excludes".
>
> The quoted commit also predates the current linux-next policy change:
> `Assisted-by` is no longer a recognized trailer. `generated-content.rst`
> asks that tool-assisted discovery be stated in the changelog prose instead.
>
> Tested-by: Daehyeon Ko <4ncienth@xxxxxxxxx>
Can you overhaul (shorten etc) the patch description and send it out for proper
review?
--
Cheers,
David