Re: [PATCH V8] mm/debug: Add tests validating architecture page table helpers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Qian Cai <cai@xxxxxx>
- Subject: Re: [PATCH V8] mm/debug: Add tests validating architecture page table helpers
- From: Anshuman Khandual <anshuman.khandual@xxxxxxx>
- Date: Mon, 4 Nov 2019 07:45:56 +0530
- Cc: linux-mm@xxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Vlastimil Babka <vbabka@xxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, Dan Williams <dan.j.williams@xxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxxxx>, Mark Rutland <Mark.Rutland@xxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, Steven Price <Steven.Price@xxxxxxx>, Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>, Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxx>, Sri Krishna chowdary <schowdary@xxxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxx>, Russell King - ARM Linux <linux@xxxxxxxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, Heiko Carstens <heiko.carstens@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Vineet Gupta <vgupta@xxxxxxxxxxxx>, James Hogan <jhogan@xxxxxxxxxx>, Paul Burton <paul.burton@xxxxxxxx>, Ralf Baechle <ralf@xxxxxxxxxxxxxx>, "Kirill A . Shutemov" <kirill@xxxxxxxxxxxxx>, Gerald Schaefer <gerald.schaefer@xxxxxxxxxx>, Christophe Leroy <christophe.leroy@xxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, linux-snps-arc@xxxxxxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
- In-reply-to: <B6AAFA3F-745D-48E2-98CC-CFB30934CE39@lca.pw>
- References: <1572240562-23630-1-git-send-email-anshuman.khandual@arm.com> <B6AAFA3F-745D-48E2-98CC-CFB30934CE39@lca.pw>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
On 10/29/2019 04:01 PM, Qian Cai wrote:
>
>
>> On Oct 28, 2019, at 1:29 AM, Anshuman Khandual <Anshuman.Khandual@xxxxxxx> 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.
>
> This looks like a perfect candidate to streamline with the new kunit framework, no?
I have not been following the kunit test framework. But being highly dependent on
existing MM accessors (generic or platform) and very much page table modification
centric, mm/ is the best place for this test IMHO. It is now also part of DEBUG_VM
set of tests. Probably in future all existing MM tests (mm/ or lib/) might move to
kunit framework but for now it should remain with DEBUG_VM set of tests.
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]