Zi Yan <ziy@xxxxxxxxxx> writes: > On 31 Mar 2020, at 4:56, Huang, Ying wrote: >> >> From: Huang Ying <ying.huang@xxxxxxxxx> >> - /* FOLL_DUMP will return -EFAULT on huge zero page */ >> - page = follow_trans_huge_pmd(vma, addr, pmd, FOLL_DUMP); >> + if (pmd_present(*pmd)) { >> + /* FOLL_DUMP will return -EFAULT on huge zero page */ >> + page = follow_trans_huge_pmd(vma, addr, pmd, FOLL_DUMP); >> + } else if (unlikely(is_swap_pmd(*pmd))) { > > Should be: > } else if (unlikely(thp_migration_support() && is_swap_pmd(*pmd))) { Thought this again. This can reduce the code size if thp_migration_support() isn't enabled. I will do this in the next version. Best Regards, Huang, Ying