linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Some small improvements to reserve_mem
@ 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
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Guilherme G. Piccoli @ 2026-02-17 19:45 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, kernel-dev, kernel, gpiccoli, Andrew Morton,
	Mike Rapoport, Steven Rostedt

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-02-22 13:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-17 19:45 [PATCH 0/2] Some small improvements to reserve_mem 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-22 13:58     ` Guilherme G. Piccoli
2026-02-21  8:29 ` [PATCH 0/2] Some small improvements to reserve_mem Mike Rapoport

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox