[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <013801d23b31$f47a7cb0$dd6f7610$@alibaba-inc.com>
Date: Thu, 10 Nov 2016 17:08:07 +0800
From: "Hillf Danton" <hillf.zj@...baba-inc.com>
To: "'Naoya Horiguchi'" <n-horiguchi@...jp.nec.com>,
<linux-mm@...ck.org>
Cc: "'Kirill A. Shutemov'" <kirill.shutemov@...ux.intel.com>,
"'Hugh Dickins'" <hughd@...gle.com>,
"'Andrew Morton'" <akpm@...ux-foundation.org>,
"'Dave Hansen'" <dave.hansen@...el.com>,
"'Andrea Arcangeli'" <aarcange@...hat.com>,
"'Mel Gorman'" <mgorman@...hsingularity.net>,
"'Michal Hocko'" <mhocko@...nel.org>,
"'Vlastimil Babka'" <vbabka@...e.cz>,
"'Pavel Emelyanov'" <xemul@...allels.com>,
"'Zi Yan'" <zi.yan@...rutgers.edu>,
"'Balbir Singh'" <bsingharora@...il.com>,
<linux-kernel@...r.kernel.org>,
"'Naoya Horiguchi'" <nao.horiguchi@...il.com>,
"'Anshuman Khandual'" <khandual@...ux.vnet.ibm.com>
Subject: Re: [PATCH v2 07/12] mm: thp: check pmd migration entry in common path
On Tuesday, November 08, 2016 7:32 AM Naoya Horiguchi wrote:
>
> @@ -1013,6 +1027,9 @@ int do_huge_pmd_wp_page(struct fault_env *fe, pmd_t orig_pmd)
> if (unlikely(!pmd_same(*fe->pmd, orig_pmd)))
> goto out_unlock;
>
> + if (unlikely(!pmd_present(orig_pmd)))
> + goto out_unlock;
> +
Can we encounter a migration entry after acquiring ptl ?
> page = pmd_page(orig_pmd);
> VM_BUG_ON_PAGE(!PageCompound(page) || !PageHead(page), page);
> /*
[...]
> @@ -3591,6 +3591,10 @@ static int __handle_mm_fault(struct vm_area_struct *vma, unsigned long address,
> int ret;
>
> barrier();
> + if (unlikely(is_pmd_migration_entry(orig_pmd))) {
> + pmd_migration_entry_wait(mm, fe.pmd);
> + return 0;
> + }
> if (pmd_trans_huge(orig_pmd) || pmd_devmap(orig_pmd)) {
> if (pmd_protnone(orig_pmd) && vma_is_accessible(vma))
> return do_huge_pmd_numa_page(&fe, orig_pmd);
Powered by blists - more mailing lists