Re: [PATCH] thp: use is_zero_pfn after pte_present check

2015-10-12 Thread Andrea Arcangeli
Hello, On Mon, Oct 12, 2015 at 05:15:06PM +0200, Vlastimil Babka wrote: > So this patch should be stable 4.1+. Does it apply both in -next and > 4.3-rcX? It applies clean to 4.3-rc but it'll reject on <= 4.2 because of some orthogonal change, so for stable it sounds better to send a separate pat

Re: [PATCH] thp: use is_zero_pfn after pte_present check

2015-10-12 Thread Kirill A. Shutemov
On Mon, Oct 12, 2015 at 11:57:46PM +0900, Minchan Kim wrote: > Hello, > > On Mon, Oct 12, 2015 at 01:13:20PM +0300, Kirill A. Shutemov wrote: > > On Mon, Oct 12, 2015 at 10:54:16AM +0900, Minchan Kim wrote: > > > Use is_zero_pfn on pteval only after pte_present check on pteval > > > (It might be b

Re: [PATCH] thp: use is_zero_pfn after pte_present check

2015-10-12 Thread Vlastimil Babka
On 10/12/2015 04:57 PM, Minchan Kim wrote: Hello, On Mon, Oct 12, 2015 at 01:13:20PM +0300, Kirill A. Shutemov wrote: On Mon, Oct 12, 2015 at 10:54:16AM +0900, Minchan Kim wrote: Use is_zero_pfn on pteval only after pte_present check on pteval (It might be better idea to introduce is_zero_pte

Re: [PATCH] thp: use is_zero_pfn after pte_present check

2015-10-12 Thread Minchan Kim
Hello, On Mon, Oct 12, 2015 at 01:13:20PM +0300, Kirill A. Shutemov wrote: > On Mon, Oct 12, 2015 at 10:54:16AM +0900, Minchan Kim wrote: > > Use is_zero_pfn on pteval only after pte_present check on pteval > > (It might be better idea to introduce is_zero_pte where checks > > pte_present first).

Re: [PATCH] thp: use is_zero_pfn after pte_present check

2015-10-12 Thread Kirill A. Shutemov
On Mon, Oct 12, 2015 at 10:54:16AM +0900, Minchan Kim wrote: > Use is_zero_pfn on pteval only after pte_present check on pteval > (It might be better idea to introduce is_zero_pte where checks > pte_present first). Otherwise, it could work with swap or > migration entry and if pte_pfn's result is e

[PATCH] thp: use is_zero_pfn after pte_present check

2015-10-11 Thread Minchan Kim
Use is_zero_pfn on pteval only after pte_present check on pteval (It might be better idea to introduce is_zero_pte where checks pte_present first). Otherwise, it could work with swap or migration entry and if pte_pfn's result is equal to zero_pfn by chance, we lose user's data in __collapse_huge_pa