From: Mike Rapoport <rppt@linux.ibm.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: "Qian Cai (QUIC)" <quic_qiancai@quicinc.com>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.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: Wed, 26 May 2021 20:25:04 +0300 [thread overview]
Message-ID: <YK6EcMPETjBkVahC@linux.ibm.com> (raw)
In-Reply-To: <20210526130426.GD19992@arm.com>
On Wed, May 26, 2021 at 02:04:26PM +0100, Catalin Marinas wrote:
> On Wed, May 26, 2021 at 12:09:14PM +0000, Qian Cai (QUIC) wrote:
> > [ 0.000000] Early memory node ranges
> > [ 0.000000] node 0: [mem 0x0000000090000000-0x0000000091ffffff]
>
> Maybe de-selecting HOLES_IN_ZONE is not correct for arm64 in all
> circumstances. In a configuration with 64K pages, MAX_ORDER is 14,
> MAX_ORDER_NR_PAGES is 8192, so a 2^29 address range. However, the above
> range starts on 2^28 boundary.
>
> SECTION_SIZE_BITS is 29 in this configuration but the corresponding
> mem_map[] in the first half of the first section is probably not marked
> as reserved as we'd do for NOMAP.
We do initialize (or at least we should) the first of the first section in
page_alloc::init_unavailable_range() so the range [0x8000000 - 0x9000000]
will have struct pages marked as reserved.
I think it should be fine to de-select HOLES_IN_ZONE as long as MAX_ORDER
chunk does not exceed a section because we do have memory map there in such
case and HOLES_IN_ZONE along with pfn_valid_within() protected against
access to non-existing memory map entries.
We still have an issue with memory map initialization, and probably I've
missed something in decoupling of "do we have memory there" from
pfn_valid().
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2021-05-26 17:25 UTC|newest]
Thread overview: 22+ 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:37 ` David Hildenbrand
2021-05-26 6:40 ` Mike Rapoport
2021-05-26 12:09 ` Qian Cai (QUIC)
2021-05-26 13:04 ` Catalin Marinas
2021-05-26 17:25 ` Mike Rapoport [this message]
2021-05-26 17:24 ` Mike Rapoport
2021-05-27 0:16 ` Qian Cai
2021-05-27 0:31 ` Andrew Morton
2021-05-27 7:25 ` Stephen Rothwell
2021-05-27 8:56 ` Mike Rapoport
2021-05-27 14:33 ` Qian Cai
2021-05-27 16:22 ` Mike Rapoport
2021-05-27 17:00 ` Qian Cai
2021-05-27 17:12 ` David Hildenbrand
2021-05-27 17:50 ` Catalin Marinas
2021-05-27 22:56 ` Andrew Morton
2021-05-28 5:13 ` Mike Rapoport
2021-06-08 7:06 ` Anshuman Khandual
2021-06-14 8:25 ` Mike Rapoport
2021-06-15 0:13 ` Andrew Morton
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=YK6EcMPETjBkVahC@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).