We now have to do a page_folio(page) and then test for hugetlb.This is great. We will check the trend to know whether it's recovered
return folio_test_hugetlb(page_folio(page));
Nowadays, folio_test_hugetlb() will be faster than at c0bff412e6 times, so maybe at least part of the overhead is gone.