Re: [PATCH v5 01/11] mm: x86: move _PAGE_SWP_SOFT_DIRTY from bit 7 to bit 1

2017-05-19 Thread Dave Hansen
On 05/19/2017 09:31 AM, Zi Yan wrote: >> This description lacks a problem statement. What's the problem? >> >> _PAGE_PSE is used to distinguish between a truly non-present >> (_PAGE_PRESENT=0) PMD, and a PMD which is undergoing a THP >> split and should be treated as present. >> >>

Re: [PATCH v5 01/11] mm: x86: move _PAGE_SWP_SOFT_DIRTY from bit 7 to bit 1

2017-05-19 Thread Dave Hansen
On 05/19/2017 09:31 AM, Zi Yan wrote: >> This description lacks a problem statement. What's the problem? >> >> _PAGE_PSE is used to distinguish between a truly non-present >> (_PAGE_PRESENT=0) PMD, and a PMD which is undergoing a THP >> split and should be treated as present. >> >>

Re: [PATCH v5 01/11] mm: x86: move _PAGE_SWP_SOFT_DIRTY from bit 7 to bit 1

2017-05-19 Thread Zi Yan
On 19 May 2017, at 11:55, Dave Hansen wrote: > On 04/20/2017 01:47 PM, Zi Yan wrote: >> pmd_present() checks _PAGE_PSE along with _PAGE_PRESENT to avoid >> false negative return when it races with thp spilt >> (during which _PAGE_PRESENT is temporary cleared.) I don't think that >> dropping

Re: [PATCH v5 01/11] mm: x86: move _PAGE_SWP_SOFT_DIRTY from bit 7 to bit 1

2017-05-19 Thread Zi Yan
On 19 May 2017, at 11:55, Dave Hansen wrote: > On 04/20/2017 01:47 PM, Zi Yan wrote: >> pmd_present() checks _PAGE_PSE along with _PAGE_PRESENT to avoid >> false negative return when it races with thp spilt >> (during which _PAGE_PRESENT is temporary cleared.) I don't think that >> dropping

Re: [PATCH v5 01/11] mm: x86: move _PAGE_SWP_SOFT_DIRTY from bit 7 to bit 1

2017-05-19 Thread Dave Hansen
On 04/20/2017 01:47 PM, Zi Yan wrote: > pmd_present() checks _PAGE_PSE along with _PAGE_PRESENT to avoid > false negative return when it races with thp spilt > (during which _PAGE_PRESENT is temporary cleared.) I don't think that > dropping _PAGE_PSE check in pmd_present() works well because it

Re: [PATCH v5 01/11] mm: x86: move _PAGE_SWP_SOFT_DIRTY from bit 7 to bit 1

2017-05-19 Thread Dave Hansen
On 04/20/2017 01:47 PM, Zi Yan wrote: > pmd_present() checks _PAGE_PSE along with _PAGE_PRESENT to avoid > false negative return when it races with thp spilt > (during which _PAGE_PRESENT is temporary cleared.) I don't think that > dropping _PAGE_PSE check in pmd_present() works well because it

Re: [PATCH v5 01/11] mm: x86: move _PAGE_SWP_SOFT_DIRTY from bit 7 to bit 1

2017-05-19 Thread Anshuman Khandual
On 04/21/2017 02:17 AM, Zi Yan wrote: > From: Naoya Horiguchi > > pmd_present() checks _PAGE_PSE along with _PAGE_PRESENT to avoid > false negative return when it races with thp spilt > (during which _PAGE_PRESENT is temporary cleared.) I don't think that > dropping

Re: [PATCH v5 01/11] mm: x86: move _PAGE_SWP_SOFT_DIRTY from bit 7 to bit 1

2017-05-19 Thread Anshuman Khandual
On 04/21/2017 02:17 AM, Zi Yan wrote: > From: Naoya Horiguchi > > pmd_present() checks _PAGE_PSE along with _PAGE_PRESENT to avoid > false negative return when it races with thp spilt > (during which _PAGE_PRESENT is temporary cleared.) I don't think that > dropping _PAGE_PSE check in

[PATCH v5 01/11] mm: x86: move _PAGE_SWP_SOFT_DIRTY from bit 7 to bit 1

2017-04-20 Thread Zi Yan
From: Naoya Horiguchi pmd_present() checks _PAGE_PSE along with _PAGE_PRESENT to avoid false negative return when it races with thp spilt (during which _PAGE_PRESENT is temporary cleared.) I don't think that dropping _PAGE_PSE check in pmd_present() works well because

[PATCH v5 01/11] mm: x86: move _PAGE_SWP_SOFT_DIRTY from bit 7 to bit 1

2017-04-20 Thread Zi Yan
From: Naoya Horiguchi pmd_present() checks _PAGE_PSE along with _PAGE_PRESENT to avoid false negative return when it races with thp spilt (during which _PAGE_PRESENT is temporary cleared.) I don't think that dropping _PAGE_PSE check in pmd_present() works well because it can hurt optimization of