Messages in this thread | | | From | "Huang\, Ying" <> | Subject | Re: [PATCH] /proc/PID/smaps: Add PMD migration entry parsing | Date | Thu, 02 Apr 2020 09:49:33 +0800 |
| |
Zi Yan <ziy@nvidia.com> writes:
> On 31 Mar 2020, at 4:56, Huang, Ying wrote: >> >> From: Huang Ying <ying.huang@intel.com> >> - /* 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
| |