Re: [RFC v5 3/3] mm: make swapin readahead to improve thp collapse rate

From: Kirill A. Shutemov
Date: Thu Sep 17 2015 - 09:28:33 EST


On Mon, Sep 14, 2015 at 10:31:45PM +0300, Ebru Akagunduz wrote:
> @@ -2655,6 +2696,8 @@ static void collapse_huge_page(struct mm_struct *mm,
>
> anon_vma_lock_write(vma->anon_vma);
>
> + __collapse_huge_page_swapin(mm, vma, address, pmd, pte);
> +

Do I miss something, or 'pte' is not initialized at this point?
And the value is not really used in __collapse_huge_page_swapin().

> pte = pte_offset_map(pmd, address);
> pte_ptl = pte_lockptr(mm, pmd);