linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Guilherme G. Piccoli" <gpiccoli@igalia.com>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, kernel-dev@igalia.com,
	kernel@gpiccoli.net, gpiccoli@igalia.com,
	Andrew Morton <akpm@linux-foundation.org>,
	Mike Rapoport <rppt@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: [PATCH 0/2] Some small improvements to reserve_mem
Date: Tue, 17 Feb 2026 16:45:05 -0300	[thread overview]
Message-ID: <20260217195816.861684-1-gpiccoli@igalia.com> (raw)

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.

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

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



             reply	other threads:[~2026-02-17 19:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-17 19:45 Guilherme G. Piccoli [this message]
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 ` [PATCH 0/2] Some small improvements to reserve_mem 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=20260217195816.861684-1-gpiccoli@igalia.com \
    --to=gpiccoli@igalia.com \
    --cc=akpm@linux-foundation.org \
    --cc=kernel-dev@igalia.com \
    --cc=kernel@gpiccoli.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rostedt@goodmis.org \
    --cc=rppt@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