All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@linux.ibm.com>
To: Qian Cai <quic_qiancai@quicinc.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	David Hildenbrand <david@redhat.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: Arm64 crash while reading memory sysfs
Date: Thu, 27 May 2021 19:22:00 +0300	[thread overview]
Message-ID: <YK/HKMgajBCwpLt8@linux.ibm.com> (raw)
In-Reply-To: <ce5a5920-3046-21b5-42c0-2237ec1eef13@quicinc.com>

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.

-- 
Sincerely yours,
Mike.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Mike Rapoport <rppt@linux.ibm.com>
To: Qian Cai <quic_qiancai@quicinc.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	David Hildenbrand <david@redhat.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: Arm64 crash while reading memory sysfs
Date: Thu, 27 May 2021 19:22:00 +0300	[thread overview]
Message-ID: <YK/HKMgajBCwpLt8@linux.ibm.com> (raw)
In-Reply-To: <ce5a5920-3046-21b5-42c0-2237ec1eef13@quicinc.com>

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.

-- 
Sincerely yours,
Mike.


  reply	other threads:[~2021-05-27 17:58 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25 15:25 Arm64 crash while reading memory sysfs Qian Cai (QUIC)
2021-05-25 15:25 ` Qian Cai (QUIC)
2021-05-25 15:37 ` David Hildenbrand
2021-05-25 15:37   ` David Hildenbrand
2021-05-26  6:40 ` Mike Rapoport
2021-05-26  6:40   ` Mike Rapoport
2021-05-26 12:09   ` Qian Cai (QUIC)
2021-05-26 12:09     ` Qian Cai (QUIC)
2021-05-26 13:04     ` Catalin Marinas
2021-05-26 13:04       ` Catalin Marinas
2021-05-26 17:25       ` Mike Rapoport
2021-05-26 17:25         ` Mike Rapoport
2021-05-26 17:24     ` Mike Rapoport
2021-05-26 17:24       ` Mike Rapoport
2021-05-27  0:16       ` Qian Cai
2021-05-27  0:16         ` Qian Cai
2021-05-27  0:31         ` Andrew Morton
2021-05-27  0:31           ` Andrew Morton
2021-05-27  7:25           ` Stephen Rothwell
2021-05-27  7:25             ` Stephen Rothwell
2021-05-27  8:56         ` Mike Rapoport
2021-05-27  8:56           ` Mike Rapoport
2021-05-27 14:33           ` Qian Cai
2021-05-27 14:33             ` Qian Cai
2021-05-27 16:22             ` Mike Rapoport [this message]
2021-05-27 16:22               ` Mike Rapoport
2021-05-27 17:00               ` Qian Cai
2021-05-27 17:00                 ` Qian Cai
2021-05-27 17:12               ` David Hildenbrand
2021-05-27 17:12                 ` David Hildenbrand
2021-05-27 17:50               ` Catalin Marinas
2021-05-27 17:50                 ` Catalin Marinas
2021-05-27 22:56                 ` Andrew Morton
2021-05-27 22:56                   ` Andrew Morton
2021-05-28  5:13                   ` Mike Rapoport
2021-05-28  5:13                     ` Mike Rapoport
2021-06-08  7:06                     ` Anshuman Khandual
2021-06-08  7:06                       ` Anshuman Khandual
2021-06-14  8:25                       ` Mike Rapoport
2021-06-14  8:25                         ` Mike Rapoport
2021-06-15  0:13                         ` Andrew Morton
2021-06-15  0:13                           ` Andrew Morton
2021-06-15  6:05                           ` Mike Rapoport
2021-06-15  6:05                             ` Mike Rapoport

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YK/HKMgajBCwpLt8@linux.ibm.com \
    --to=rppt@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=david@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maz@kernel.org \
    --cc=quic_qiancai@quicinc.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.