linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] mm/debug_vm_pgtable: Test pmd_leaf() behavior with pmd_mkinvalid()
@ 2024-05-01 14:44 Ryan Roberts
  2024-05-02  2:43 ` Anshuman Khandual
  2024-05-02 13:10 ` David Hildenbrand
  0 siblings, 2 replies; 6+ messages in thread
From: Ryan Roberts @ 2024-05-01 14:44 UTC (permalink / raw)
  To: Andrew Morton, Catalin Marinas, Anshuman Khandual; +Cc: Ryan Roberts, linux-mm

An invalidated pmd should still cause pmd_leaf() to return true. Let's
test for that to ensure all arches remain consistent.

Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
---

Hi Andrew,

This applies on top of v6.9-rc5. It came out of a discussion with Catalin around
the pmd_mkinvalid() bug (the fix for which I just posted). I've run the new test
on both arm64 and x86_64.

Thanks,
Ryan

 mm/debug_vm_pgtable.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c
index 65c19025da3d..57e9cb0820ab 100644
--- a/mm/debug_vm_pgtable.c
+++ b/mm/debug_vm_pgtable.c
@@ -981,6 +981,7 @@ static void __init pmd_thp_tests(struct pgtable_debug_args *args)
 #ifndef __HAVE_ARCH_PMDP_INVALIDATE
 	WARN_ON(!pmd_trans_huge(pmd_mkinvalid(pmd_mkhuge(pmd))));
 	WARN_ON(!pmd_present(pmd_mkinvalid(pmd_mkhuge(pmd))));
+	WARN_ON(!pmd_leaf(pmd_mkinvalid(pmd_mkhuge(pmd))));
 #endif /* __HAVE_ARCH_PMDP_INVALIDATE */
 }

--
2.25.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-05-02 13:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-01 14:44 [PATCH v1] mm/debug_vm_pgtable: Test pmd_leaf() behavior with pmd_mkinvalid() Ryan Roberts
2024-05-02  2:43 ` Anshuman Khandual
2024-05-02  7:30   ` Ryan Roberts
2024-05-02  8:03     ` Anshuman Khandual
2024-05-02  8:20       ` Ryan Roberts
2024-05-02 13:10 ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox