Linux SNPS ARC Archive on
 help / color / Atom feed
From: Anshuman Khandual <>
	Catalin Marinas <>,
	Heiko Carstens <>,
	Paul Mackerras <>,
	"H. Peter Anvin" <>,, Will Deacon <>,,,, Jonathan Corbet <>,
	Michael Ellerman <>,,,
	Mike Rapoport <>,
	Christian Borntraeger <>,
	Ingo Molnar <>,,,
	Benjamin Herrenschmidt <>,,
	Vasily Gorbik <>,
	Anshuman Khandual <>,, Paul Walmsley <>,
	"Kirill A . Shutemov" <>,
	Thomas Gleixner <>,,,
	Vineet Gupta <>,, Palmer Dabbelt <>,, Borislav Petkov <>,
	Andrew Morton <>,,
Subject: [PATCH V5 0/4] mm/debug_vm_pgtable: Add some more tests
Date: Mon, 13 Jul 2020 08:53:03 +0530
Message-ID: <> (raw)

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 (

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:866 debug_vm_pgtable+0x940/0xa54

This series is based on v5.8-rc5.

Changes in V5:

- Dropped RANDOM_ORVALUE from hugetlb_advanced_tests()
- Folded in Mike's patch for the rst document
- Fixed typos in the rst document

Changes in V4: (

- Replaced READ_ONCE() with ptep_get() while accessing PTE pointers per Christophe
- Fixed function argument alignments per Christophe

Changes in V3: (

- 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

Changes in V2: (

- Dropped CONFIG_ARCH_HAS_PTE_SPECIAL per Christophe
- Dropped CONFIG_NUMA_BALANCING per Christophe
- Dropped CONFIG_HAVE_ARCH_SOFT_DIRTY per Christophe
- Dropped CONFIG_MIGRATION per Christophe
- Moved page allocation & free inside swap_migration_tests() per Christophe
- Added CONFIG_TRANSPARENT_HUGEPAGE to protect pfn_pmd()
- Added a patch for other arch advanced page table helper tests
- Added a patch creating a documentation for page table helper semantics

Changes in V1: (

Cc: Jonathan Corbet <>
Cc: Andrew Morton <>
Cc: Mike Rapoport <>
Cc: Vineet Gupta <>
Cc: Catalin Marinas <>
Cc: Will Deacon <>
Cc: Benjamin Herrenschmidt <>
Cc: Paul Mackerras <>
Cc: Michael Ellerman <>
Cc: Heiko Carstens <>
Cc: Vasily Gorbik <>
Cc: Christian Borntraeger <>
Cc: Thomas Gleixner <>
Cc: Ingo Molnar <>
Cc: Borislav Petkov <>
Cc: "H. Peter Anvin" <>
Cc: Kirill A. Shutemov <>
Cc: Paul Walmsley <>
Cc: Palmer Dabbelt <>
Cc: Zi Yan <>
Cc: Gerald Schaefer <>
Cc: Christophe Leroy <>
Cc: Christophe Leroy <>

Anshuman Khandual (4):
  mm/debug_vm_pgtable: Add tests validating arch helpers for core MM features
  mm/debug_vm_pgtable: Add tests validating advanced arch page table helpers
  mm/debug_vm_pgtable: Add debug prints for individual tests
  Documentation/mm: Add descriptions for arch page table helpers

 Documentation/vm/arch_pgtable_helpers.rst | 258 +++++++++
 mm/debug_vm_pgtable.c                     | 666 +++++++++++++++++++++-
 2 files changed, 922 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/vm/arch_pgtable_helpers.rst


linux-snps-arc mailing list

             reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13  3:23 Anshuman Khandual [this message]
2020-07-13  3:23 ` [PATCH V5 1/4] mm/debug_vm_pgtable: Add tests validating arch helpers for core MM features Anshuman Khandual
2020-07-16 14:14   ` Steven Price
2020-07-17  3:20     ` Anshuman Khandual
2020-07-13  3:23 ` [PATCH V5 2/4] mm/debug_vm_pgtable: Add tests validating advanced arch page table helpers Anshuman Khandual
2020-07-13  3:23 ` [PATCH V5 3/4] mm/debug_vm_pgtable: Add debug prints for individual tests Anshuman Khandual
2020-07-13  3:23 ` [PATCH V5 4/4] Documentation/mm: Add descriptions for arch page table helpers Anshuman Khandual

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux SNPS ARC Archive on

Archives are clonable:
	git clone --mirror linux-snps-arc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-snps-arc linux-snps-arc/ \
	public-inbox-index linux-snps-arc

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone