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@xxxxxxxxxxxx> 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]#