Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

From: Christophe Leroy
Date: Sun Feb 02 2020 - 03:31:53 EST




Le 02/02/2020 Ã 08:18, Anshuman Khandual a ÃcritÂ:
On 01/30/2020 07:43 PM, Christophe Leroy wrote:


Le 30/01/2020 Ã 14:04, Anshuman Khandual a ÃcritÂ:

On 01/28/2020 10:35 PM, Christophe Leroy wrote:


I think we could make it standalone and 'default y if DEBUG_VM' instead.

Which will yield the same result like before but in a different way. But
yes, this test could go about either way but unless there is a good enough
reason why change the current one.

I think if we want people to really use it on other architectures it must be possible to activate it without having to modify Kconfig. Otherwise people won't even know the test exists and the architecture fails the test.

The purpose of a test suite is to detect bugs. If you can't run the test until you have fixed the bugs, I guess nobody will ever detect the bugs and they will never be fixed.

So I think:
- the test should be 'default y' when ARCH_HAS_DEBUG_VM_PGTABLE is selected
- the test should be 'default n' when ARCH_HAS_DEBUG_VM_PGTABLE is not selected, and it should be user selectable if EXPERT is selected.

Something like:

config DEBUG_VM_PGTABLE
ÂÂÂ bool "Debug arch page table for semantics compliance" if ARCH_HAS_DEBUG_VM_PGTABLE || EXPERT
ÂÂÂ depends on MMU

(ARCH_HAS_DEBUG_VM_PGTABLE || EXPERT) be moved along side MMU on the same line ?

Yes could also go along side MMU, or could be a depend by itself:
depends on ARCH_HAS_DEBUG_VM_PGTABLE || EXPERT


ÂÂÂ default 'n' if !ARCH_HAS_DEBUG_VM_PGTABLE
ÂÂÂ default 'y' if DEBUG_VM

This looks good, at least until we get all platforms enabled. Will do all these
changes along with s390 enablement and re-spin.

Christophe