Re: [PATCH v12 5/6] khugepaged: enable collapse pmd for pte-mapped THP
From: Oleg Nesterov
Date: Mon Aug 12 2019 - 09:23:03 EST
On 08/12, Kirill A. Shutemov wrote:
>
> On Fri, Aug 09, 2019 at 06:01:18PM +0000, Song Liu wrote:
> > + if (pte_none(*pte) || !pte_present(*pte))
> > + continue;
>
> You don't need to check both. Present is never none.
Agreed.
Kirill, while you are here, shouldn't retract_page_tables() check
vma->anon_vma (and probably do mm_find_pmd) under vm_mm->mmap_sem?
Can't it race with, say, do_cow_fault?
Oleg.