On Thu, May 22, 2025 at 07:34:56PM +0800, Ge Yang wrote:
It seems that we cannot simply remove the folio_test_hugetlb() check. The reasons are as follows:
Yeah, my thought was whether we could move the folio_hstate within alloc_and_dissolve_hugetlb_folio(), since the latter really needs to take the lock. But isolate_or_dissolve_huge_page() also needs the 'hstate' not only to pass it onto alloc_and_dissolve_hugetlb_folio() but to check whether hstate is gigantic.
Umh, kinda hate sparkling the locks all around.