From: Mike Rapoport <rppt@kernel.org>
To: lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org
Subject: [LSF/MM/BPF TOPIC] Consolidating representations of the physical memory
Date: Tue, 1 Feb 2022 21:06:29 +0200 [thread overview]
Message-ID: <YfmEtd3vg/x7uqXx@kernel.org> (raw)
Hi all,
I've posted this last year, but last year was a bit slow for me, so nothing
really changed since then :(
We have several coarse representations of the physical memory consisting of
[start, end, flags] structures per memory region. There is memblock that
some architectures keep after boot, there is iomem_resource tree and
"System RAM" nodes in that tree, there are memory blocks exposed in sysfs
and then there are per-architecture structures, sometimes even several per
architecture.
The multiplication of such structures and lack of consistency between some
of them does not help the maintainability and can be a reason for subtle
bugs here and there.
The layout of the physical memory is defined by hardware and firmware and
there is not much room for its interpretation; single abstraction of the
physical memory should suffice and a single [start, end, flags] type should
be enough. There is no fundamental reason why we cannot converge
per-architecture representations of the physical memory, like e820,
drmem_lmb, memblock or numa_meminfo into a generic abstraction.
I suggest to use memblock as the basis for such abstraction. It is already
supported on all architectures and it is used as the generic representation
of the physical memory at boot time. Closing the gaps between per
architecture structures and memblock is anyway required for more robust
initialization of the memory management. Addition of simple locking of
memblock data for memory hotplug, making the memblock "allocator" part
discardable and a mechanism to synchronize "System RAM" resources with
memblock would complete the picture.
--
Sincerely yours,
Mike.
next reply other threads:[~2022-02-01 19:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-01 19:06 Mike Rapoport [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-06-09 7:44 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=YfmEtd3vg/x7uqXx@kernel.org \
--to=rppt@kernel.org \
--cc=linux-mm@kvack.org \
--cc=lsf-pc@lists.linux-foundation.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