From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC6ADC2D0E8 for ; Fri, 27 Mar 2020 06:46:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8E96B20716 for ; Fri, 27 Mar 2020 06:46:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8E96B20716 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 12D166B0010; Fri, 27 Mar 2020 02:46:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0B7766B0032; Fri, 27 Mar 2020 02:46:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EC1366B0036; Fri, 27 Mar 2020 02:46:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0138.hostedemail.com [216.40.44.138]) by kanga.kvack.org (Postfix) with ESMTP id CDB9D6B0010 for ; Fri, 27 Mar 2020 02:46:52 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 7CF238248076 for ; Fri, 27 Mar 2020 06:46:52 +0000 (UTC) X-FDA: 76640209464.17.blow27_590fa23f77a4a X-HE-Tag: blow27_590fa23f77a4a X-Filterd-Recvd-Size: 5995 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Fri, 27 Mar 2020 06:46:51 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EC7317FA; Thu, 26 Mar 2020 23:46:50 -0700 (PDT) Received: from [10.163.1.31] (unknown [10.163.1.31]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6B53F3F71F; Thu, 26 Mar 2020 23:50:47 -0700 (PDT) Subject: Re: [PATCH V2 0/3] mm/debug: Add more arch page table helper tests To: Christophe Leroy , linux-mm@kvack.org Cc: Jonathan Corbet , Andrew Morton , Mike Rapoport , Vineet Gupta , Catalin Marinas , Will Deacon , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "Kirill A . Shutemov" , Paul Walmsley , Palmer Dabbelt , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-riscv@lists.infradead.org, x86@kernel.org, linux-doc@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org References: <1585027375-9997-1-git-send-email-anshuman.khandual@arm.com> <2bb4badc-2b7a-e15d-a99b-b1bd38c9d9bf@arm.com> From: Anshuman Khandual Message-ID: <9675882f-0ec5-5e46-551f-dd3aa38bf8d8@arm.com> Date: Fri, 27 Mar 2020 12:16:34 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 03/26/2020 08:53 PM, Christophe Leroy wrote: >=20 >=20 > Le 26/03/2020 =C3=A0 03:23, Anshuman Khandual a =C3=A9crit=C2=A0: >> >> >> On 03/24/2020 10:52 AM, Anshuman Khandual wrote: >>> This series adds more arch page table helper tests. The new tests her= e are >>> either related to core memory functions and advanced arch pgtable hel= pers. >>> This also creates a documentation file enlisting all expected semanti= cs as >>> suggested by Mike Rapoport (https://lkml.org/lkml/2020/1/30/40). >>> >>> This series has been tested on arm64 and x86 platforms. >> >> If folks can test these patches out on remaining ARCH_HAS_DEBUG_VM_PGT= ABLE >> enabled platforms i.e s390, arc, powerpc (32 and 64), that will be rea= lly >> appreciated. Thank you. >> >=20 > On powerpc 8xx (PPC32), I get: >=20 > [=C2=A0=C2=A0 53.338368] debug_vm_pgtable: debug_vm_pgtable: Validating= architecture page table helpers > [=C2=A0=C2=A0 53.347403] ------------[ cut here ]------------ > [=C2=A0=C2=A0 53.351832] WARNING: CPU: 0 PID: 1 at mm/debug_vm_pgtable.= c:647 debug_vm_pgtable+0x280/0x3f4 mm/debug_vm_pgtable.c:647 ? With the following commits in place 53a8338ce (HEAD) Documentation/mm: Add descriptions for arch page table h= elper 5d4913fc1 mm/debug: Add tests validating arch advanced page table helpers bcaf120a7 mm/debug: Add tests validating arch page table helpers for core= features d6ed5a4a5 x86/memory: Drop pud_mknotpresent() 0739d1f8d mm/debug: Add tests validating architecture page table helpers 16fbf79b0 (tag: v5.6-rc7) Linux 5.6-rc7 mm/debug_vm_pgtable.c:647 is here. #ifdef CONFIG_ARCH_ENABLE_THP_MIGRATION static void __init pmd_swap_tests(unsigned long pfn, pgprot_t prot) { swp_entry_t swp; pmd_t pmd; -----------------------------> Line #647 pmd =3D pfn_pmd(pfn, prot); swp =3D __pmd_to_swp_entry(pmd); WARN_ON(!pmd_same(pmd, __swp_entry_to_pmd(swp))); } #else static void __init pmd_swap_tests(unsigned long pfn, pgprot_t prot) { } #end Did I miss something ? > [=C2=A0=C2=A0 53.360140] CPU: 0 PID: 1 Comm: swapper Not tainted 5.6.0-= rc7-s3k-dev-01090-g92710e99881f #3544 > [=C2=A0=C2=A0 53.368718] NIP:=C2=A0 c0777c04 LR: c0777bb8 CTR: 00000000 > [=C2=A0=C2=A0 53.373720] REGS: c9023df0 TRAP: 0700=C2=A0=C2=A0 Not tain= ted (5.6.0-rc7-s3k-dev-01090-g92710e99881f) > [=C2=A0=C2=A0 53.382042] MSR:=C2=A0 00029032 =C2=A0 CR:= 22000222=C2=A0 XER: 20000000 > [=C2=A0=C2=A0 53.388667] > [=C2=A0=C2=A0 53.388667] GPR00: c0777bb8 c9023ea8 c6120000 00000001 1e4= 10000 00000000 00000000 007641c9 > [=C2=A0=C2=A0 53.388667] GPR08: 00000000 00000001 00000000 ffffffff 820= 00222 00000000 c00039b8 00000000 > [=C2=A0=C2=A0 53.388667] GPR16: 00000000 00000000 00000000 fffffff0 065= fc000 1e410000 c6600000 000001e4 > [=C2=A0=C2=A0 53.388667] GPR24: 000001d9 c062d14c c65fc000 c642d448 000= 006c9 00000000 c65f8000 c65fc040 > [=C2=A0=C2=A0 53.423400] NIP [c0777c04] debug_vm_pgtable+0x280/0x3f4 > [=C2=A0=C2=A0 53.428559] LR [c0777bb8] debug_vm_pgtable+0x234/0x3f4 > [=C2=A0=C2=A0 53.433593] Call Trace: > [=C2=A0=C2=A0 53.436048] [c9023ea8] [c0777bb8] debug_vm_pgtable+0x234/0= x3f4 (unreliable) > [=C2=A0=C2=A0 53.442936] [c9023f28] [c00039e0] kernel_init+0x28/0x124 > [=C2=A0=C2=A0 53.448184] [c9023f38] [c000f174] ret_from_kernel_thread+0= x14/0x1c > [=C2=A0=C2=A0 53.454245] Instruction dump: > [=C2=A0=C2=A0 53.457180] 41a20008 4bea3ed9 62890021 7d36b92e 7d36b82e 7= 1290fd0 3149ffff 7d2a4910 > [=C2=A0=C2=A0 53.464838] 0f090000 5789077e 3149ffff 7d2a4910 <0f090000>= 38c00000 38a00000 38800000 > [=C2=A0=C2=A0 53.472671] ---[ end trace fd5dd92744dc0065 ]--- Could you please point me to the exact test which is failing ? > [=C2=A0=C2=A0 53.519778] Freeing unused kernel memory: 608K >=20 >=20 So I assume that the system should have come till runtime just fine apart= from the above warning message because.