From: Mike Rapoport <rppt@kernel.org>
To: "Guilherme G. Piccoli" <gpiccoli@igalia.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kernel-dev@igalia.com, kernel@gpiccoli.net,
Andrew Morton <akpm@linux-foundation.org>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH 0/2] Some small improvements to reserve_mem
Date: Sat, 21 Feb 2026 10:29:39 +0200 [thread overview]
Message-ID: <aZls879r9Yxd7Jcz@kernel.org> (raw)
In-Reply-To: <20260217195816.861684-1-gpiccoli@igalia.com>
Hi Guilherme,
On Tue, Feb 17, 2026 at 04:45:05PM -0300, Guilherme G. Piccoli wrote:
> Currently the "reserve_mem" parsing is lacking information both
> if it works or not. It can fail in many ways, so I'm adding some
> messages to help users determine failure.
Yep, these are useful.
> At the same time, if it succeeds, the only place I can "see" it
> is in the accounting of reserved memory, as the following kernel message:
>
> [0.086881] Memory: 3958852K/4189472K available (19671K kernel code, 2893K rwdata, 9724K rodata, 4340K init, 5040K bss, 220244K reserved, 0K cma-reserved)
>
> Since "crashkernel=" reservations are shown in both kernel log and /proc/iomem
> and other unused memory buffers appear in /proc/iomem as "RAM buffer" entries,
> I've added hereby a debugfs entry for "reserve_mem". Though I didn't love the
> implementation, I think it's not so hideous so decided to send, please lemme
> know what you think and if we should improve code or even discard the idea heheh
crashkernel reservations are part of the ABI and kexec tools parse them in
userspace, so they should be exposed. reserve_mem consumers are in the
kernel, so if the reservation succeeds there's no real need for userspace
to see where are the reserve_mem regions.
I don't generally object showing them in debugfs, but the changelog for
debugfs addition should give more details why they would be useful rather
than just say that unlike crashkernel they don't show up anywhere.
> Notice that, with this change, the memblock debugfs folder ends-up showing
> always, no matter if we have ARCH_KEEP_MEMBLOCK set or if reserve_mem is set.
> Thanks in advance for reviews/comments!
>
>
> Guilherme G. Piccoli (2):
> mm/memblock: Print out errors on reserve_mem parser
> mm/memblock: Add reserve_mem debugfs info
>
> mm/memblock.c | 65 ++++++++++++++++++++++++++++++++++++++++++---------
> 1 file changed, 54 insertions(+), 11 deletions(-)
>
> --
> 2.50.1
>
>
--
Sincerely yours,
Mike.
prev parent reply other threads:[~2026-02-21 8:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 19:45 Guilherme G. Piccoli
2026-02-17 19:45 ` [PATCH 1/2] mm/memblock: Print out errors on reserve_mem parser Guilherme G. Piccoli
2026-02-17 19:45 ` [PATCH 2/2] mm/memblock: Add reserve_mem debugfs info Guilherme G. Piccoli
2026-02-18 0:15 ` kernel test robot
2026-02-18 0:26 ` kernel test robot
2026-02-21 8:52 ` Mike Rapoport
2026-02-21 8:29 ` Mike Rapoport [this message]
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=aZls879r9Yxd7Jcz@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=gpiccoli@igalia.com \
--cc=kernel-dev@igalia.com \
--cc=kernel@gpiccoli.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rostedt@goodmis.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