Re: [PATCH 2/5] mm,hugetlb: Document the reason to lock the folio in the faulting path

From: Oscar Salvador
Date: Tue Jun 17 2025 - 10:02:29 EST


On Tue, Jun 17, 2025 at 03:42:09PM +0200, David Hildenbrand wrote:
> Yes. As an alternative, keep locking it in the caller and only unlock in the
> !anon case?

Yes, that crossed my mind too, and I think that that would the cleanest way.
Since hugetlb_no_page() will be the only one taking the lock, we can drop it
there for !anon case, and put a fat (maybe not so fat :-)?) explaining the
deal.

thanks for the insights David!


--
Oscar Salvador
SUSE Labs