[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18cdce9e-2107-04b3-f58f-b1e932265965@arm.com>
Date: Tue, 5 Nov 2019 06:00:31 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: linux-mm@...ck.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
Jason Gunthorpe <jgg@...pe.ca>,
Dan Williams <dan.j.williams@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Michal Hocko <mhocko@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Mark Brown <broonie@...nel.org>,
Steven Price <Steven.Price@....com>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Kees Cook <keescook@...omium.org>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Matthew Wilcox <willy@...radead.org>,
Sri Krishna chowdary <schowdary@...dia.com>,
Dave Hansen <dave.hansen@...el.com>,
Russell King - ARM Linux <linux@...linux.org.uk>,
Michael Ellerman <mpe@...erman.id.au>,
Paul Mackerras <paulus@...ba.org>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
"David S. Miller" <davem@...emloft.net>,
Vineet Gupta <vgupta@...opsys.com>,
James Hogan <jhogan@...nel.org>,
Paul Burton <paul.burton@...s.com>,
Ralf Baechle <ralf@...ux-mips.org>,
"Kirill A . Shutemov" <kirill@...temov.name>,
Gerald Schaefer <gerald.schaefer@...ibm.com>,
Christophe Leroy <christophe.leroy@....fr>,
Ingo Molnar <mingo@...nel.org>,
linux-snps-arc@...ts.infradead.org, linux-mips@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-ia64@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-s390@...r.kernel.org,
linux-sh@...r.kernel.org, sparclinux@...r.kernel.org,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V8] mm/debug: Add tests validating architecture page table
helpers
On 10/28/2019 10:59 AM, Anshuman Khandual wrote:
> This adds tests which will validate architecture page table helpers and
> other accessors in their compliance with expected generic MM semantics.
> This will help various architectures in validating changes to existing
> page table helpers or addition of new ones.
>
> This test covers basic page table entry transformations including but not
> limited to old, young, dirty, clean, write, write protect etc at various
> level along with populating intermediate entries with next page table page
> and validating them.
>
> Test page table pages are allocated from system memory with required size
> and alignments. The mapped pfns at page table levels are derived from a
> real pfn representing a valid kernel text symbol. This test gets called
> right after page_alloc_init_late().
>
> This gets build and run when CONFIG_DEBUG_VM_PGTABLE is selected along with
> CONFIG_VM_DEBUG. Architectures willing to subscribe this test also need to
> select CONFIG_ARCH_HAS_DEBUG_VM_PGTABLE which for now is limited to x86 and
> arm64. Going forward, other architectures too can enable this after fixing
> build or runtime problems (if any) with their page table helpers.
>
> Folks interested in making sure that a given platform's page table helpers
> conform to expected generic MM semantics should enable the above config
> which will just trigger this test during boot. Any non conformity here will
> be reported as an warning which would need to be fixed. This test will help
> catch any changes to the agreed upon semantics expected from generic MM and
> enable platforms to accommodate it thereafter.
>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Vlastimil Babka <vbabka@...e.cz>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Mike Rapoport <rppt@...ux.vnet.ibm.com>
> Cc: Jason Gunthorpe <jgg@...pe.ca>
> Cc: Dan Williams <dan.j.williams@...el.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Michal Hocko <mhocko@...nel.org>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: Mark Brown <broonie@...nel.org>
> Cc: Steven Price <Steven.Price@....com>
> Cc: Ard Biesheuvel <ard.biesheuvel@...aro.org>
> Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>
> Cc: Kees Cook <keescook@...omium.org>
> Cc: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
> Cc: Matthew Wilcox <willy@...radead.org>
> Cc: Sri Krishna chowdary <schowdary@...dia.com>
> Cc: Dave Hansen <dave.hansen@...el.com>
> Cc: Russell King - ARM Linux <linux@...linux.org.uk>
> Cc: Michael Ellerman <mpe@...erman.id.au>
> Cc: Paul Mackerras <paulus@...ba.org>
> Cc: Martin Schwidefsky <schwidefsky@...ibm.com>
> Cc: Heiko Carstens <heiko.carstens@...ibm.com>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Vineet Gupta <vgupta@...opsys.com>
> Cc: James Hogan <jhogan@...nel.org>
> Cc: Paul Burton <paul.burton@...s.com>
> Cc: Ralf Baechle <ralf@...ux-mips.org>
> Cc: Kirill A. Shutemov <kirill@...temov.name>
> Cc: Gerald Schaefer <gerald.schaefer@...ibm.com>
> Cc: Christophe Leroy <christophe.leroy@....fr>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: linux-snps-arc@...ts.infradead.org
> Cc: linux-mips@...r.kernel.org
> Cc: linux-arm-kernel@...ts.infradead.org
> Cc: linux-ia64@...r.kernel.org
> Cc: linuxppc-dev@...ts.ozlabs.org
> Cc: linux-s390@...r.kernel.org
> Cc: linux-sh@...r.kernel.org
> Cc: sparclinux@...r.kernel.org
> Cc: x86@...nel.org
> Cc: linux-kernel@...r.kernel.org
>
> Tested-by: Christophe Leroy <christophe.leroy@....fr> #PPC32
> Suggested-by: Catalin Marinas <catalin.marinas@....com>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> Signed-off-by: Christophe Leroy <christophe.leroy@....fr>
> Signed-off-by: Anshuman Khandual <anshuman.khandual@....com>
> ---
>
> This adds a test validation for architecture exported page table helpers.
> Patch adds basic transformation tests at various levels of the page table.
>
> This test was originally suggested by Catalin during arm64 THP migration
> RFC discussion earlier. Going forward it can include more specific tests
> with respect to various generic MM functions like THP, HugeTLB etc and
> platform specific tests.
>
> https://lore.kernel.org/linux-mm/20190628102003.GA56463@arrakis.emea.arm.com/
>
> Needs to be applied on linux-next (next-20191025).
>
> Changes in V8:
>
> - Enabled ARCH_HAS_DEBUG_VM_PGTABLE on PPC32 platform per Christophe
> - Updated feature documentation as DEBUG_VM_PGTABLE is now enabled on PPC32 platform
> - Moved ARCH_HAS_DEBUG_VM_PGTABLE earlier to indent it with DEBUG_VM per Christophe
> - Added an information message in debug_vm_pgtable() per Christophe
> - Dropped random_vaddr boundary condition checks per Christophe and Qian
> - Replaced virt_addr_valid() check with pfn_valid() check in debug_vm_pgtable()
> - Slightly changed pr_fmt(fmt) information
Hello Andrew,
Just wondering if this version looks okay or is there anything else which still
needs to be accommodated here first, before this test can be considered for merging ?
Thank you.
- Anshuman
Powered by blists - more mailing lists