Re: [PATCH v3 08/13] mm/debug_vm_pgtable/thp: Use page table depost/withdraw with THP

2020-08-31 Thread Christophe Leroy
Le 01/09/2020 à 08:25, Aneesh Kumar K.V a écrit : On 9/1/20 8:52 AM, Anshuman Khandual wrote: There is a checkpatch.pl warning here. WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line) #7: Architectures like ppc64 use deposited page table while updating th

Re: [PATCH v3 09/13] mm/debug_vm_pgtable/locks: Move non page table modifying test together

2020-08-31 Thread Aneesh Kumar K.V
On 9/1/20 9:11 AM, Anshuman Khandual wrote: On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: This will help in adding proper locks in a later patch It really makes sense to classify these tests here as static and dynamic. Static are the ones that test via page table entry values modification

Re: [PATCH v3 13/13] mm/debug_vm_pgtable: populate a pte entry before fetching it

2020-08-31 Thread Aneesh Kumar K.V
On 9/1/20 8:55 AM, Anshuman Khandual wrote: On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: pte_clear_tests operate on an existing pte entry. Make sure that is not a none pte entry. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 6 -- 1 file changed, 4 insertions(+), 2 de

Re: [PATCH v3 12/13] mm/debug_vm_pgtable/hugetlb: Disable hugetlb test on ppc64

2020-08-31 Thread Aneesh Kumar K.V
On 9/1/20 9:33 AM, Anshuman Khandual wrote: On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: The seems to be missing quite a lot of details w.r.t allocating the correct pgtable_t page (huge_pte_alloc()), holding the right lock (huge_pte_lock()) etc. The vma used is also not a hugetlb VMA. ppc6

Re: [PATCH v3 08/13] mm/debug_vm_pgtable/thp: Use page table depost/withdraw with THP

2020-08-31 Thread Aneesh Kumar K.V
On 9/1/20 8:52 AM, Anshuman Khandual wrote: On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: Architectures like ppc64 use deposited page table while updating the huge pte entries. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 10 +++--- 1 file changed, 7 insertions(+), 3

Re: [PATCH v3 06/13] mm/debug_vm_pgtable/THP: Mark the pte entry huge before using set_pmd/pud_at

2020-08-31 Thread Aneesh Kumar K.V
On 9/1/20 8:51 AM, Anshuman Khandual wrote: On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: kernel expects entries to be marked huge before we use set_pmd_at()/set_pud_at(). Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 21 - 1 file changed, 12 insertion

Re: [PATCH v3 03/13] mm/debug_vm_pgtable/ppc64: Avoid setting top bits in radom value

2020-08-31 Thread Aneesh Kumar K.V
On 9/1/20 8:45 AM, Anshuman Khandual wrote: On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: ppc64 use bit 62 to indicate a pte entry (_PAGE_PTE). Avoid setting that bit in random value. Signed-off-by: Aneesh Kumar K.V --- mm/debug_vm_pgtable.c | 13 ++--- 1 file changed, 10 insert

Re: [PATCH v3 12/13] mm/debug_vm_pgtable/hugetlb: Disable hugetlb test on ppc64

2020-08-31 Thread Anshuman Khandual
On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: > The seems to be missing quite a lot of details w.r.t allocating > the correct pgtable_t page (huge_pte_alloc()), holding the right > lock (huge_pte_lock()) etc. The vma used is also not a hugetlb VMA. > > ppc64 do have runtime checks within CONF

Re: [PATCH v3 10/13] mm/debug_vm_pgtable/locks: Take correct page table lock

2020-08-31 Thread Anshuman Khandual
On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: > Make sure we call pte accessors with correct lock held. > > Signed-off-by: Aneesh Kumar K.V > --- > mm/debug_vm_pgtable.c | 34 -- > 1 file changed, 20 insertions(+), 14 deletions(-) > > diff --git a/mm/debug_v

Re: [PATCH v3 09/13] mm/debug_vm_pgtable/locks: Move non page table modifying test together

2020-08-31 Thread Anshuman Khandual
On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: > This will help in adding proper locks in a later patch It really makes sense to classify these tests here as static and dynamic. Static are the ones that test via page table entry values modification without changing anything on the actual page

Re: [PATCH v3 13/13] mm/debug_vm_pgtable: populate a pte entry before fetching it

2020-08-31 Thread Anshuman Khandual
On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: > pte_clear_tests operate on an existing pte entry. Make sure that is not a none > pte entry. > > Signed-off-by: Aneesh Kumar K.V > --- > mm/debug_vm_pgtable.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/mm/de

Re: [PATCH v3 08/13] mm/debug_vm_pgtable/thp: Use page table depost/withdraw with THP

2020-08-31 Thread Anshuman Khandual
On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: > Architectures like ppc64 use deposited page table while updating the huge pte > entries. > > Signed-off-by: Aneesh Kumar K.V > --- > mm/debug_vm_pgtable.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/mm/

Re: [PATCH v3 06/13] mm/debug_vm_pgtable/THP: Mark the pte entry huge before using set_pmd/pud_at

2020-08-31 Thread Anshuman Khandual
On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: > kernel expects entries to be marked huge before we use > set_pmd_at()/set_pud_at(). > > Signed-off-by: Aneesh Kumar K.V > --- > mm/debug_vm_pgtable.c | 21 - > 1 file changed, 12 insertions(+), 9 deletions(-) > > diff --g

Re: [PATCH v3 05/13] mm/debug_vm_pgtable/savedwrite: Enable savedwrite test with CONFIG_NUMA_BALANCING

2020-08-31 Thread Anshuman Khandual
On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: > Saved write support was added to track the write bit of a pte after marking > the > pte protnone. This was done so that AUTONUMA can convert a write pte to > protnone > and still track the old write bit. When converting it back we set the pte

Re: [PATCH v3 04/13] mm/debug_vm_pgtables/hugevmap: Use the arch helper to identify huge vmap support.

2020-08-31 Thread Anshuman Khandual
On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: > ppc64 supports huge vmap only with radix translation. Hence use arch helper > to determine the huge vmap support. > > Signed-off-by: Aneesh Kumar K.V > --- > mm/debug_vm_pgtable.c | 15 +-- > 1 file changed, 13 insertions(+), 2 del

Re: [PATCH v3 03/13] mm/debug_vm_pgtable/ppc64: Avoid setting top bits in radom value

2020-08-31 Thread Anshuman Khandual
On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: > ppc64 use bit 62 to indicate a pte entry (_PAGE_PTE). Avoid setting that bit > in > random value. > > Signed-off-by: Aneesh Kumar K.V > --- > mm/debug_vm_pgtable.c | 13 ++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > di

Re: [PATCH v3 02/13] powerpc/mm: Move setting pte specific flags to pfn_pte

2020-08-31 Thread Anshuman Khandual
On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: > powerpc used to set the pte specific flags in set_pte_at(). This is different > from other architectures. To be consistent with other architecture update > pfn_pte to set _PAGE_PTE on ppc64. Also, drop now unused pte_mkpte. > > We add a VM_WARN_

Re: [PATCH v3 01/13] powerpc/mm: Add DEBUG_VM WARN for pmd_clear

2020-08-31 Thread Anshuman Khandual
On 08/27/2020 01:34 PM, Aneesh Kumar K.V wrote: > With the hash page table, the kernel should not use pmd_clear for clearing > huge pte entries. Add a DEBUG_VM WARN to catch the wrong usage. > > Signed-off-by: Aneesh Kumar K.V > --- > arch/powerpc/include/asm/book3s/64/pgtable.h | 14