Message ID | 1592192277-8421-1-git-send-email-anshuman.khandual@arm.com (mailing list archive) |
---|---|
Headers | show |
Series | mm/debug_vm_pgtable: Add some more tests | expand |
On 06/15/2020 09:07 AM, Anshuman Khandual wrote: > This series adds some more arch page table helper validation tests which > are related to core and advanced memory functions. This also creates a > documentation, enlisting expected semantics for all page table helpers as > suggested by Mike Rapoport previously (https://lkml.org/lkml/2020/1/30/40). > > There are many TRANSPARENT_HUGEPAGE and ARCH_HAS_TRANSPARENT_HUGEPAGE_PUD > ifdefs scattered across the test. But consolidating all the fallback stubs > is not very straight forward because ARCH_HAS_TRANSPARENT_HUGEPAGE_PUD is > not explicitly dependent on ARCH_HAS_TRANSPARENT_HUGEPAGE. > > Tested on arm64, x86 platforms but only build tested on all other enabled > platforms through ARCH_HAS_DEBUG_VM_PGTABLE i.e powerpc, arc, s390. The > following failure on arm64 still exists which was mentioned previously. It > will be fixed with the upcoming THP migration on arm64 enablement series. > > WARNING .... mm/debug_vm_pgtable.c:860 debug_vm_pgtable+0x940/0xa54 > WARN_ON(!pmd_present(pmd_mkinvalid(pmd_mkhuge(pmd)))) > > This series is based on v5.8-rc1. > > Changes in V3: > > - Replaced HAVE_ARCH_SOFT_DIRTY with MEM_SOFT_DIRTY > - Added HAVE_ARCH_HUGE_VMAP checks in pxx_huge_tests() per Gerald > - Updated documentation for pmd_thp_tests() per Zi Yan > - Replaced READ_ONCE() with huge_ptep_get() per Gerald > - Added pte_mkhuge() and masking with PMD_MASK per Gerald > - Replaced pte_same() with holding pfn check in pxx_swap_tests() > - Added documentation for all (#ifdef #else #endif) per Gerald > - Updated pmd_protnone_tests() per Gerald > - Updated HugeTLB PTE creation in hugetlb_advanced_tests() per Gerald > - Replaced [pmd|pud]_mknotpresent() with [pmd|pud]_mkinvalid() > - Added has_transparent_hugepage() check for PMD and PUD tests > - Added a patch which debug prints all individual tests being executed > - Updated documentation for renamed [pmd|pud]_mkinvalid() helpers Hello Gerald/Christophe/Vineet, It would be really great if you could give this series a quick test on s390/ppc/arc platforms respectively. Thank you. - Anshuman
On Wed, Jun 24, 2020 at 08:43:10AM +0530, Anshuman Khandual wrote: [...] > Hello Gerald/Christophe/Vineet, > > It would be really great if you could give this series a quick test > on s390/ppc/arc platforms respectively. Thank you. That worked for me with the default and debug s390 configurations. Would you like to try with some particular options or combinations of the options? > - Anshuman
On Wed, 24 Jun 2020 13:05:39 +0200 Alexander Gordeev <agordeev@linux.ibm.com> wrote: > On Wed, Jun 24, 2020 at 08:43:10AM +0530, Anshuman Khandual wrote: > > [...] > > > Hello Gerald/Christophe/Vineet, > > > > It would be really great if you could give this series a quick test > > on s390/ppc/arc platforms respectively. Thank you. > > That worked for me with the default and debug s390 configurations. > Would you like to try with some particular options or combinations > of the options? It will be enabled automatically on all archs that set ARCH_HAS_DEBUG_VM_PGTABLE, which we do for s390 unconditionally. Also, DEBUG_VM has to be set, which we have only in the debug config. So only the s390 debug config will have it enabled, you can check dmesg for "debug_vm_pgtable" to see when / where it was run, and if it triggered any warnings. I also checked with the v3 series, and it works fine for s390.
On Wed, Jun 24, 2020 at 01:48:08PM +0200, Gerald Schaefer wrote: > On Wed, 24 Jun 2020 13:05:39 +0200 > Alexander Gordeev <agordeev@linux.ibm.com> wrote: > > > On Wed, Jun 24, 2020 at 08:43:10AM +0530, Anshuman Khandual wrote: > > > > [...] > > > > > Hello Gerald/Christophe/Vineet, > > > > > > It would be really great if you could give this series a quick test > > > on s390/ppc/arc platforms respectively. Thank you. > > > > That worked for me with the default and debug s390 configurations. > > Would you like to try with some particular options or combinations > > of the options? > > It will be enabled automatically on all archs that set > ARCH_HAS_DEBUG_VM_PGTABLE, which we do for s390 unconditionally. > Also, DEBUG_VM has to be set, which we have only in the debug config. > So only the s390 debug config will have it enabled, you can check > dmesg for "debug_vm_pgtable" to see when / where it was run, and if it > triggered any warnings. Yes, that is what I did ;) I should have been more clear. I wonder whether Anshuman has in mind other options which possibly makes sense to set or unset and check how it goes with non-standard configurations. > I also checked with the v3 series, and it works fine for s390.
Le 24/06/2020 à 05:13, Anshuman Khandual a écrit : > > > On 06/15/2020 09:07 AM, Anshuman Khandual wrote: >> This series adds some more arch page table helper validation tests which >> are related to core and advanced memory functions. This also creates a >> documentation, enlisting expected semantics for all page table helpers as >> suggested by Mike Rapoport previously (https://lkml.org/lkml/2020/1/30/40). >> >> There are many TRANSPARENT_HUGEPAGE and ARCH_HAS_TRANSPARENT_HUGEPAGE_PUD >> ifdefs scattered across the test. But consolidating all the fallback stubs >> is not very straight forward because ARCH_HAS_TRANSPARENT_HUGEPAGE_PUD is >> not explicitly dependent on ARCH_HAS_TRANSPARENT_HUGEPAGE. >> >> Tested on arm64, x86 platforms but only build tested on all other enabled >> platforms through ARCH_HAS_DEBUG_VM_PGTABLE i.e powerpc, arc, s390. The >> following failure on arm64 still exists which was mentioned previously. It >> will be fixed with the upcoming THP migration on arm64 enablement series. >> >> WARNING .... mm/debug_vm_pgtable.c:860 debug_vm_pgtable+0x940/0xa54 >> WARN_ON(!pmd_present(pmd_mkinvalid(pmd_mkhuge(pmd)))) >> >> This series is based on v5.8-rc1. >> >> Changes in V3: >> >> - Replaced HAVE_ARCH_SOFT_DIRTY with MEM_SOFT_DIRTY >> - Added HAVE_ARCH_HUGE_VMAP checks in pxx_huge_tests() per Gerald >> - Updated documentation for pmd_thp_tests() per Zi Yan >> - Replaced READ_ONCE() with huge_ptep_get() per Gerald >> - Added pte_mkhuge() and masking with PMD_MASK per Gerald >> - Replaced pte_same() with holding pfn check in pxx_swap_tests() >> - Added documentation for all (#ifdef #else #endif) per Gerald >> - Updated pmd_protnone_tests() per Gerald >> - Updated HugeTLB PTE creation in hugetlb_advanced_tests() per Gerald >> - Replaced [pmd|pud]_mknotpresent() with [pmd|pud]_mkinvalid() >> - Added has_transparent_hugepage() check for PMD and PUD tests >> - Added a patch which debug prints all individual tests being executed >> - Updated documentation for renamed [pmd|pud]_mkinvalid() helpers > > Hello Gerald/Christophe/Vineet, > > It would be really great if you could give this series a quick test > on s390/ppc/arc platforms respectively. Thank you. > Running ok on powerpc 8xx after fixing build failures. Christophe
On 06/24/2020 08:10 PM, Alexander Gordeev wrote: > On Wed, Jun 24, 2020 at 01:48:08PM +0200, Gerald Schaefer wrote: >> On Wed, 24 Jun 2020 13:05:39 +0200 >> Alexander Gordeev <agordeev@linux.ibm.com> wrote: >> >>> On Wed, Jun 24, 2020 at 08:43:10AM +0530, Anshuman Khandual wrote: >>> >>> [...] >>> >>>> Hello Gerald/Christophe/Vineet, >>>> >>>> It would be really great if you could give this series a quick test >>>> on s390/ppc/arc platforms respectively. Thank you. >>> >>> That worked for me with the default and debug s390 configurations. >>> Would you like to try with some particular options or combinations >>> of the options? >> >> It will be enabled automatically on all archs that set >> ARCH_HAS_DEBUG_VM_PGTABLE, which we do for s390 unconditionally. >> Also, DEBUG_VM has to be set, which we have only in the debug config. >> So only the s390 debug config will have it enabled, you can check >> dmesg for "debug_vm_pgtable" to see when / where it was run, and if it >> triggered any warnings. > > Yes, that is what I did ;) > > I should have been more clear. I wonder whether Anshuman has in > mind other options which possibly makes sense to set or unset > and check how it goes with non-standard configurations. After enabling CONFIG_DEBUG_VM either explicitly or via DEBUG_VM, ideally any memory config combination on s390 which can change platform page table helpers (validated with CONFIG_DEBUG_VM) should also get tested. Recently, there was a kernel crash on ppc64 [1] and a build failure on ppc32 [2] for some particular configs. Hence it will be great if you could run this test on multiple s390 configurations. [1] 787d563b8642f35c5 ("mm/debug_vm_pgtable: fix kernel crash by checking for THP support") [2] 9449c9cb420b249eb ("mm/debug_vm_pgtable: fix build failure with powerpc 8xx") - Anshuman
On 06/24/2020 08:43 AM, Anshuman Khandual wrote: > > > On 06/15/2020 09:07 AM, Anshuman Khandual wrote: >> This series adds some more arch page table helper validation tests which >> are related to core and advanced memory functions. This also creates a >> documentation, enlisting expected semantics for all page table helpers as >> suggested by Mike Rapoport previously (https://lkml.org/lkml/2020/1/30/40). >> >> There are many TRANSPARENT_HUGEPAGE and ARCH_HAS_TRANSPARENT_HUGEPAGE_PUD >> ifdefs scattered across the test. But consolidating all the fallback stubs >> is not very straight forward because ARCH_HAS_TRANSPARENT_HUGEPAGE_PUD is >> not explicitly dependent on ARCH_HAS_TRANSPARENT_HUGEPAGE. >> >> Tested on arm64, x86 platforms but only build tested on all other enabled >> platforms through ARCH_HAS_DEBUG_VM_PGTABLE i.e powerpc, arc, s390. The >> following failure on arm64 still exists which was mentioned previously. It >> will be fixed with the upcoming THP migration on arm64 enablement series. >> >> WARNING .... mm/debug_vm_pgtable.c:860 debug_vm_pgtable+0x940/0xa54 >> WARN_ON(!pmd_present(pmd_mkinvalid(pmd_mkhuge(pmd)))) >> >> This series is based on v5.8-rc1. >> >> Changes in V3: >> >> - Replaced HAVE_ARCH_SOFT_DIRTY with MEM_SOFT_DIRTY >> - Added HAVE_ARCH_HUGE_VMAP checks in pxx_huge_tests() per Gerald >> - Updated documentation for pmd_thp_tests() per Zi Yan >> - Replaced READ_ONCE() with huge_ptep_get() per Gerald >> - Added pte_mkhuge() and masking with PMD_MASK per Gerald >> - Replaced pte_same() with holding pfn check in pxx_swap_tests() >> - Added documentation for all (#ifdef #else #endif) per Gerald >> - Updated pmd_protnone_tests() per Gerald >> - Updated HugeTLB PTE creation in hugetlb_advanced_tests() per Gerald >> - Replaced [pmd|pud]_mknotpresent() with [pmd|pud]_mkinvalid() >> - Added has_transparent_hugepage() check for PMD and PUD tests >> - Added a patch which debug prints all individual tests being executed >> - Updated documentation for renamed [pmd|pud]_mkinvalid() helpers > > Hello Gerald/Christophe/Vineet, > > It would be really great if you could give this series a quick test > on s390/ppc/arc platforms respectively. Thank you. Thanks Alexander, Gerald and Christophe for testing this out on s390 and ppc32 platforms. Probably Vineet and Qian (any other volunteers) could help us with arc and ppc64 platforms, which I would appreciate.
On 6/29/20 8:53 PM, Anshuman Khandual wrote: > > > On 06/24/2020 08:43 AM, Anshuman Khandual wrote: >> >> >> On 06/15/2020 09:07 AM, Anshuman Khandual wrote: >>> This series adds some more arch page table helper validation tests which >>> are related to core and advanced memory functions. This also creates a >>> documentation, enlisting expected semantics for all page table helpers as >>> suggested by Mike Rapoport previously (https://lkml.org/lkml/2020/1/30/40). >>> >>> There are many TRANSPARENT_HUGEPAGE and ARCH_HAS_TRANSPARENT_HUGEPAGE_PUD >>> ifdefs scattered across the test. But consolidating all the fallback stubs >>> is not very straight forward because ARCH_HAS_TRANSPARENT_HUGEPAGE_PUD is >>> not explicitly dependent on ARCH_HAS_TRANSPARENT_HUGEPAGE. >>> >>> Tested on arm64, x86 platforms but only build tested on all other enabled >>> platforms through ARCH_HAS_DEBUG_VM_PGTABLE i.e powerpc, arc, s390. The >>> following failure on arm64 still exists which was mentioned previously. It >>> will be fixed with the upcoming THP migration on arm64 enablement series. >>> >>> WARNING .... mm/debug_vm_pgtable.c:860 debug_vm_pgtable+0x940/0xa54 >>> WARN_ON(!pmd_present(pmd_mkinvalid(pmd_mkhuge(pmd)))) >>> >>> This series is based on v5.8-rc1. >>> >>> Changes in V3: >>> >>> - Replaced HAVE_ARCH_SOFT_DIRTY with MEM_SOFT_DIRTY >>> - Added HAVE_ARCH_HUGE_VMAP checks in pxx_huge_tests() per Gerald >>> - Updated documentation for pmd_thp_tests() per Zi Yan >>> - Replaced READ_ONCE() with huge_ptep_get() per Gerald >>> - Added pte_mkhuge() and masking with PMD_MASK per Gerald >>> - Replaced pte_same() with holding pfn check in pxx_swap_tests() >>> - Added documentation for all (#ifdef #else #endif) per Gerald >>> - Updated pmd_protnone_tests() per Gerald >>> - Updated HugeTLB PTE creation in hugetlb_advanced_tests() per Gerald >>> - Replaced [pmd|pud]_mknotpresent() with [pmd|pud]_mkinvalid() >>> - Added has_transparent_hugepage() check for PMD and PUD tests >>> - Added a patch which debug prints all individual tests being executed >>> - Updated documentation for renamed [pmd|pud]_mkinvalid() helpers >> >> Hello Gerald/Christophe/Vineet, >> >> It would be really great if you could give this series a quick test >> on s390/ppc/arc platforms respectively. Thank you. > > Thanks Alexander, Gerald and Christophe for testing this out on s390 > and ppc32 platforms. Probably Vineet and Qian (any other volunteers) > could help us with arc and ppc64 platforms, which I would appreciate. Tested-by: Vineet Gupta <vgupta@synopsys.com> Apologies for the delay in getting to this. Works fine on ARC I have following enabled: # CONFIG_DEBUG_VM_RB is not set # CONFIG_DEBUG_VM_PGFLAGS is not set CONFIG_DEBUG_VM_PGTABLE=y And this boots fine NET: Registered protocol family 17 NET: Registered protocol family 15 debug_vm_pgtable: [debug_vm_pgtable ]: Validating architecture page table helpers Warning: unable to open an initial console. Freeing unused kernel memory: 18840K This architecture does not have kernel memory protection. Run /init as init process with arguments: /init with environment: HOME=/ TERM=linux ... *********************************************************************** Welcome to ARCLinux *********************************************************************** [ARCLinux]#
On 07/01/2020 03:02 AM, Vineet Gupta wrote: > On 6/29/20 8:53 PM, Anshuman Khandual wrote: >> >> >> On 06/24/2020 08:43 AM, Anshuman Khandual wrote: >>> >>> >>> On 06/15/2020 09:07 AM, Anshuman Khandual wrote: >>>> This series adds some more arch page table helper validation tests which >>>> are related to core and advanced memory functions. This also creates a >>>> documentation, enlisting expected semantics for all page table helpers as >>>> suggested by Mike Rapoport previously (https://lkml.org/lkml/2020/1/30/40). >>>> >>>> There are many TRANSPARENT_HUGEPAGE and ARCH_HAS_TRANSPARENT_HUGEPAGE_PUD >>>> ifdefs scattered across the test. But consolidating all the fallback stubs >>>> is not very straight forward because ARCH_HAS_TRANSPARENT_HUGEPAGE_PUD is >>>> not explicitly dependent on ARCH_HAS_TRANSPARENT_HUGEPAGE. >>>> >>>> Tested on arm64, x86 platforms but only build tested on all other enabled >>>> platforms through ARCH_HAS_DEBUG_VM_PGTABLE i.e powerpc, arc, s390. The >>>> following failure on arm64 still exists which was mentioned previously. It >>>> will be fixed with the upcoming THP migration on arm64 enablement series. >>>> >>>> WARNING .... mm/debug_vm_pgtable.c:860 debug_vm_pgtable+0x940/0xa54 >>>> WARN_ON(!pmd_present(pmd_mkinvalid(pmd_mkhuge(pmd)))) >>>> >>>> This series is based on v5.8-rc1. >>>> >>>> Changes in V3: >>>> >>>> - Replaced HAVE_ARCH_SOFT_DIRTY with MEM_SOFT_DIRTY >>>> - Added HAVE_ARCH_HUGE_VMAP checks in pxx_huge_tests() per Gerald >>>> - Updated documentation for pmd_thp_tests() per Zi Yan >>>> - Replaced READ_ONCE() with huge_ptep_get() per Gerald >>>> - Added pte_mkhuge() and masking with PMD_MASK per Gerald >>>> - Replaced pte_same() with holding pfn check in pxx_swap_tests() >>>> - Added documentation for all (#ifdef #else #endif) per Gerald >>>> - Updated pmd_protnone_tests() per Gerald >>>> - Updated HugeTLB PTE creation in hugetlb_advanced_tests() per Gerald >>>> - Replaced [pmd|pud]_mknotpresent() with [pmd|pud]_mkinvalid() >>>> - Added has_transparent_hugepage() check for PMD and PUD tests >>>> - Added a patch which debug prints all individual tests being executed >>>> - Updated documentation for renamed [pmd|pud]_mkinvalid() helpers >>> >>> Hello Gerald/Christophe/Vineet, >>> >>> It would be really great if you could give this series a quick test >>> on s390/ppc/arc platforms respectively. Thank you. >> >> Thanks Alexander, Gerald and Christophe for testing this out on s390 >> and ppc32 platforms. Probably Vineet and Qian (any other volunteers) >> could help us with arc and ppc64 platforms, which I would appreciate. > > Tested-by: Vineet Gupta <vgupta@synopsys.com> > > Apologies for the delay in getting to this. Works fine on ARC > > I have following enabled: > > # CONFIG_DEBUG_VM_RB is not set > # CONFIG_DEBUG_VM_PGFLAGS is not set > CONFIG_DEBUG_VM_PGTABLE=y > > And this boots fine > > NET: Registered protocol family 17 > NET: Registered protocol family 15 > debug_vm_pgtable: [debug_vm_pgtable ]: Validating architecture page table > helpers > Warning: unable to open an initial console. > Freeing unused kernel memory: 18840K > This architecture does not have kernel memory protection. > Run /init as init process > with arguments: > /init > with environment: > HOME=/ > TERM=linux > ... > *********************************************************************** > Welcome to ARCLinux > *********************************************************************** > [ARCLinux]# > Thanks for testing this Vineet, really appreciate it.