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=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 2B6B2C47089 for ; Thu, 27 May 2021 19:10:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DFACC6139A for ; Thu, 27 May 2021 19:10:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DFACC6139A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QVb6MOcTx6BPVnNbViV5c80AOYHQ9+6P7PPorddUDoM=; b=jX3ZYbLe2qcOPS 2v5u4oV6U6wIuWAe82PfAR78DakYYY6fdUyZeRyWpxtn9c8gQ+HhgULJjj2aGcboHJOs79ZgOqP5x X1XvQpREJxIwC3wcxsO3D8dm/c2bdfHP+GJIc2oEbalR7yEvQXjfGcUTV8+hc6fj4bdujAq50/M5i KBkQeDlVJm5SPpZXLf1/1nsMq48NgLGPCfw3CR2Il5iJBunnJ9/naLbm1t8LfJsCRGmp6py7Q4z+A Z/OPVCmLe7nJgM1YZDCnUdGDfePLEPpQ8k6ZMNkPiXspnEcvpe7YQ5Ox2aXVZ8ZDQ//tFq5Z5sjpY o3yFN2ecRQwcSdApz0ug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmLMY-008ngp-Vx; Thu, 27 May 2021 19:08:12 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmK9k-008F3E-S0 for linux-arm-kernel@lists.infradead.org; Thu, 27 May 2021 17:50:54 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 91678613AB; Thu, 27 May 2021 17:50:50 +0000 (UTC) Date: Thu, 27 May 2021 18:50:48 +0100 From: Catalin Marinas To: Mike Rapoport Cc: Qian Cai , Andrew Morton , David Hildenbrand , Anshuman Khandual , Ard Biesheuvel , Linux Memory Management List , Will Deacon , Marc Zyngier , Linux Kernel Mailing List , Linux ARM Subject: Re: Arm64 crash while reading memory sysfs Message-ID: <20210527175047.GK8661@arm.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210527_105052_955552_E66352D7 X-CRM114-Status: GOOD ( 19.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, May 27, 2021 at 07:22:00PM +0300, Mike Rapoport wrote: > On Thu, May 27, 2021 at 10:33:13AM -0400, Qian Cai wrote: > > On 5/27/2021 4:56 AM, Mike Rapoport wrote: > > > Let's drop memblock=debug for now and add this instead: > > > > [ 0.000000][ T0] Booting Linux on physical CPU 0x0000000000 [0x503f0002] > > [ 0.000000][ T0] Linux version 5.13.0-rc3-next-20210526+ (root@admin5) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #31 SMP Thu May 27 12:32:40 UTC 2021 > > [ 0.000000][ T0] Inode-cache hash table entries: 4194304 (order: 9, 33554432 bytes, linear) > > [ 0.000000][ T0] mem auto-init: stack:off, heap alloc:on, heap free:off > > [ 0.000000][ T0] MEMBLOCK configuration: > > [ 0.000000][ T0] memory size = 0x0000001ff0000000 reserved size = 0x0000000421e33ae8 > > [ 0.000000][ T0] memory.cnt = 0xc > > [ 0.000000][ T0] Memory: 777216K/133955584K available (17984K kernel code, 118722K rwdata, 4416K rodata, 6080K init, 67276K bss, 17379072K reserved, 0K cma-reserved) > > I still cannot understand where most of the memory disappeared, but it > seems entirely different issue. > > > > Sorry, I've missed that the BUG is apparently triggered for pfn + i. Can > > > you please try this instead: > > > > [ 259.216661][ T1417] test_pages_in_a_zone: pfn 8000 is not valid > > [ 259.226547][ T1417] page:00000000f4aa8c5c is uninitialized and poisoned > > [ 259.226560][ T1417] page dumped because: VM_BUG_ON_PAGE(PagePoisoned(p)) > > Can you please try Anshuman's patch "arm64/mm: Drop HAVE_ARCH_PFN_VALID": > > https://lore.kernel.org/lkml/1621947349-25421-1-git-send-email-anshuman.khandual@arm.com > > It seems to me that the check for memblock_is_memory() in > arm64::pfn_valid() is what makes init_unavailable_range() to bail out for > section parts that are not actually populated and then we have > VM_BUG_ON_PAGE(PagePoisoned(p)) for these pages. I acked Anshuman's patch, I think they all need to go in together. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 1370CC4707F for ; Thu, 27 May 2021 17:50:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 928C46135C for ; Thu, 27 May 2021 17:50:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 928C46135C Authentication-Results: mail.kernel.org; dmarc=fail (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 2BE466B006C; Thu, 27 May 2021 13:50:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2951B6B006E; Thu, 27 May 2021 13:50:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1AC176B0070; Thu, 27 May 2021 13:50:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0169.hostedemail.com [216.40.44.169]) by kanga.kvack.org (Postfix) with ESMTP id E01FA6B006C for ; Thu, 27 May 2021 13:50:53 -0400 (EDT) Received: from smtpin34.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 892C4824999B for ; Thu, 27 May 2021 17:50:53 +0000 (UTC) X-FDA: 78187751586.34.278A203 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf21.hostedemail.com (Postfix) with ESMTP id C6C09E000833 for ; Thu, 27 May 2021 17:50:42 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 91678613AB; Thu, 27 May 2021 17:50:50 +0000 (UTC) Date: Thu, 27 May 2021 18:50:48 +0100 From: Catalin Marinas To: Mike Rapoport Cc: Qian Cai , Andrew Morton , David Hildenbrand , Anshuman Khandual , Ard Biesheuvel , Linux Memory Management List , Will Deacon , Marc Zyngier , Linux Kernel Mailing List , Linux ARM Subject: Re: Arm64 crash while reading memory sysfs Message-ID: <20210527175047.GK8661@arm.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Authentication-Results: imf21.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf21.hostedemail.com: domain of cmarinas@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=cmarinas@kernel.org X-Stat-Signature: gyc3g1fiie36eidk931cxch6qwcnujw5 X-Rspamd-Queue-Id: C6C09E000833 X-Rspamd-Server: rspam02 X-HE-Tag: 1622137842-466035 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 Thu, May 27, 2021 at 07:22:00PM +0300, Mike Rapoport wrote: > On Thu, May 27, 2021 at 10:33:13AM -0400, Qian Cai wrote: > > On 5/27/2021 4:56 AM, Mike Rapoport wrote: > > > Let's drop memblock=debug for now and add this instead: > > > > [ 0.000000][ T0] Booting Linux on physical CPU 0x0000000000 [0x503f0002] > > [ 0.000000][ T0] Linux version 5.13.0-rc3-next-20210526+ (root@admin5) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #31 SMP Thu May 27 12:32:40 UTC 2021 > > [ 0.000000][ T0] Inode-cache hash table entries: 4194304 (order: 9, 33554432 bytes, linear) > > [ 0.000000][ T0] mem auto-init: stack:off, heap alloc:on, heap free:off > > [ 0.000000][ T0] MEMBLOCK configuration: > > [ 0.000000][ T0] memory size = 0x0000001ff0000000 reserved size = 0x0000000421e33ae8 > > [ 0.000000][ T0] memory.cnt = 0xc > > [ 0.000000][ T0] Memory: 777216K/133955584K available (17984K kernel code, 118722K rwdata, 4416K rodata, 6080K init, 67276K bss, 17379072K reserved, 0K cma-reserved) > > I still cannot understand where most of the memory disappeared, but it > seems entirely different issue. > > > > Sorry, I've missed that the BUG is apparently triggered for pfn + i. Can > > > you please try this instead: > > > > [ 259.216661][ T1417] test_pages_in_a_zone: pfn 8000 is not valid > > [ 259.226547][ T1417] page:00000000f4aa8c5c is uninitialized and poisoned > > [ 259.226560][ T1417] page dumped because: VM_BUG_ON_PAGE(PagePoisoned(p)) > > Can you please try Anshuman's patch "arm64/mm: Drop HAVE_ARCH_PFN_VALID": > > https://lore.kernel.org/lkml/1621947349-25421-1-git-send-email-anshuman.khandual@arm.com > > It seems to me that the check for memblock_is_memory() in > arm64::pfn_valid() is what makes init_unavailable_range() to bail out for > section parts that are not actually populated and then we have > VM_BUG_ON_PAGE(PagePoisoned(p)) for these pages. I acked Anshuman's patch, I think they all need to go in together. -- Catalin