On Wed, Jul 19, 2023 at 05:58:47PM +0800, Peng Zhang wrote: > -static inline void count_swpout_vm_event(struct page *page) > +static inline void count_swpout_vm_event(struct folio *folio) > { > #ifdef CONFIG_TRANSPARENT_HUGEPAGE > - if (unlikely(PageTransHuge(page))) > + if (unlikely(folio_test_pmd_mappable(folio))) > count_vm_event(THP_SWPOUT); > #endif As I said in my earlier response, you don't need the ifdefs. Check the definition of folio_test_pmd_mappable.