Re: [PATCH v1] mm: hugetlb: call huge_pte_alloc() only if ptep is null

2015-11-30 Thread Naoya Horiguchi
On Mon, Nov 30, 2015 at 05:20:22PM -0800, Mike Kravetz wrote: > On 11/26/2015 12:02 AM, Naoya Horiguchi wrote: > > Currently at the beginning of hugetlb_fault(), we call huge_pte_offset() > > and check whether the obtained *ptep is a migration/hwpoison entry or not. > > And if not, then we get to c

Re: [PATCH v1] mm: hugetlb: call huge_pte_alloc() only if ptep is null

2015-11-30 Thread Mike Kravetz
On 11/26/2015 12:02 AM, Naoya Horiguchi wrote: > Currently at the beginning of hugetlb_fault(), we call huge_pte_offset() > and check whether the obtained *ptep is a migration/hwpoison entry or not. > And if not, then we get to call huge_pte_alloc(). This is racy because the > *ptep could turn into

Re: [PATCH v1] mm: hugetlb: call huge_pte_alloc() only if ptep is null

2015-11-30 Thread David Rientjes
On Thu, 26 Nov 2015, Naoya Horiguchi wrote: > Currently at the beginning of hugetlb_fault(), we call huge_pte_offset() > and check whether the obtained *ptep is a migration/hwpoison entry or not. > And if not, then we get to call huge_pte_alloc(). This is racy because the > *ptep could turn into m

Re: [PATCH v1] mm: hugetlb: call huge_pte_alloc() only if ptep is null

2015-11-26 Thread Hillf Danton
> > Currently at the beginning of hugetlb_fault(), we call huge_pte_offset() > and check whether the obtained *ptep is a migration/hwpoison entry or not. > And if not, then we get to call huge_pte_alloc(). This is racy because the > *ptep could turn into migration/hwpoison entry after the huge_pte