* Re: [RFC v2 PATCH] reserve_mem: add support for static memory
[not found] ` <ajyC2eX9MKSU84Z8@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
@ 2026-06-25 8:37 ` Mike Rapoport
2026-06-26 14:54 ` Shyam Saini
0 siblings, 1 reply; 3+ messages in thread
From: Mike Rapoport @ 2026-06-25 8:37 UTC (permalink / raw)
To: Shyam Saini
Cc: linux-mm, linux-doc, linux-kernel, akpm, tgopinath, bboscaccy,
kees, tony.luck, gpiccoli, bp, rdunlap, peterz, feng.tang,
dapeng1.mi, elver, enelsonmoore, kuba, lirongqing, ebiggers,
Catalin Marinas, Will Deacon, Ard Biesheuvel, David Hildenbrand,
linux-arm-kernel
Hi Shyam,
On Wed, Jun 24, 2026 at 06:22:33PM -0700, Shyam Saini wrote:
> On 21 Jun 2026 13:36, Mike Rapoport wrote:
> > On Thu, Jun 18, 2026 at 11:23:31PM -0700, Shyam Saini wrote:
> > > reserve_mem relies on dynamic memory allocation, this limits the
> > > usecase where memory is required to be preserved across the boots.
> > > Eg: ramoops memory reservation on ACPI platforms
> > >
> > > So add support to pass a pre-determined static address and reserve
> > > memory at a specified location. This enables use case like ramoops
> > > on ACPI platforms to reliably access ramoops region with previous
> > > boot logs.
> > >
> > > Also skip the parsing of <align> when static address is passed.
> > >
> > > Example syntax for static address
> > > reserve_mem=4M@0x1E0000000:oops
> >
> > reserve_mem is best effort by design because such hacks as well as memmap=
> > cannot guarantee this memory is actually free.
> >
> > If you want to preserve ramoops reliably, use KHO with reserve_mem.
> > The first kernel will allocate memory, this memory will be preserved by KHO
> > and could be picked up by the second kernel.
>
> ok, On ARM64 DTS systems, we can reserve ramoops memory in the device tree during
> the warm reboot.
The cc list actually implied x86 ;-)
Added arm64 folks now.
> For an equivalent ARM64 ACPI platform, what is the recommended way to reserve
> and preserve that memory across the boots?
I don't think it exists, but a command line option (be it memmap= or
reserve_mem=) does not seem the right way to me.
Most of the arguments that were made against adding memmap= to arm64 [1]
apply here.
If kexec is an option, KHO provides a reliable way to preserve memory
across boots.
If kexec is not an option, we should look for a generic way to specify
something like DT's reserved_mem for ACPI/EFI systems.
[1] https://lkml.kernel.org/lkml/20201118063314.22940-1-song.bao.hua@hisilicon.com/T/
> Thanks,
> Shyam
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC v2 PATCH] reserve_mem: add support for static memory
2026-06-25 8:37 ` [RFC v2 PATCH] reserve_mem: add support for static memory Mike Rapoport
@ 2026-06-26 14:54 ` Shyam Saini
2026-06-30 17:09 ` Shyam Saini
0 siblings, 1 reply; 3+ messages in thread
From: Shyam Saini @ 2026-06-26 14:54 UTC (permalink / raw)
To: Mike Rapoport
Cc: linux-mm, linux-doc, linux-kernel, akpm, tgopinath, bboscaccy,
kees, tony.luck, gpiccoli, bp, rdunlap, peterz, feng.tang,
dapeng1.mi, elver, enelsonmoore, kuba, lirongqing, ebiggers,
Catalin Marinas, Will Deacon, Ard Biesheuvel, David Hildenbrand,
linux-arm-kernel
On 25 Jun 2026 11:37, Mike Rapoport wrote:
> Hi Shyam,
>
> On Wed, Jun 24, 2026 at 06:22:33PM -0700, Shyam Saini wrote:
> > On 21 Jun 2026 13:36, Mike Rapoport wrote:
> > > On Thu, Jun 18, 2026 at 11:23:31PM -0700, Shyam Saini wrote:
> > > > reserve_mem relies on dynamic memory allocation, this limits the
> > > > usecase where memory is required to be preserved across the boots.
> > > > Eg: ramoops memory reservation on ACPI platforms
> > > >
> > > > So add support to pass a pre-determined static address and reserve
> > > > memory at a specified location. This enables use case like ramoops
> > > > on ACPI platforms to reliably access ramoops region with previous
> > > > boot logs.
> > > >
> > > > Also skip the parsing of <align> when static address is passed.
> > > >
> > > > Example syntax for static address
> > > > reserve_mem=4M@0x1E0000000:oops
> > >
> > > reserve_mem is best effort by design because such hacks as well as memmap=
> > > cannot guarantee this memory is actually free.
> > >
> > > If you want to preserve ramoops reliably, use KHO with reserve_mem.
> > > The first kernel will allocate memory, this memory will be preserved by KHO
> > > and could be picked up by the second kernel.
> >
> > ok, On ARM64 DTS systems, we can reserve ramoops memory in the device tree during
> > the warm reboot.
>
> The cc list actually implied x86 ;-)
> Added arm64 folks now.
Thanks for adding ARM folks, I had just included whatever get_maintainer script
suggested, sorry.
> > For an equivalent ARM64 ACPI platform, what is the recommended way to reserve
> > and preserve that memory across the boots?
>
> I don't think it exists, but a command line option (be it memmap= or
> reserve_mem=) does not seem the right way to me.
>
> Most of the arguments that were made against adding memmap= to arm64 [1]
> apply here.
>
> If kexec is an option, KHO provides a reliable way to preserve memory
> across boots.
>
> If kexec is not an option, we should look for a generic way to specify
> something like DT's reserved_mem for ACPI/EFI systems.
>
> [1] https://lkml.kernel.org/lkml/20201118063314.22940-1-song.bao.hua@hisilicon.com/T/
>
Well, kexec is one of the option for my use case, it also requires
memory reservation during warm reboot, I think memory can be reserved in
the firmware but this will create a dependency on firmware for Linux
reservation.
It would be great to have a in kernel memory reservation mechanism for
ARM64 ACPI platforms. I believe some other use cases like PMEM
reservation would also benefit from this.
Thanks,
Shyam
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC v2 PATCH] reserve_mem: add support for static memory
2026-06-26 14:54 ` Shyam Saini
@ 2026-06-30 17:09 ` Shyam Saini
0 siblings, 0 replies; 3+ messages in thread
From: Shyam Saini @ 2026-06-30 17:09 UTC (permalink / raw)
To: shyamsaini, ardb, catalin.marinas, david, linux-arm-kernel, will
Cc: akpm, bboscaccy, bp, dapeng1.mi, ebiggers, elver, enelsonmoore,
feng.tang, gpiccoli, kees, kuba, linux-doc, linux-kernel,
linux-mm, lirongqing, peterz, rdunlap, rppt, tgopinath, tony.luck
Hi Everyone,
> On 25 Jun 2026 11:37, Mike Rapoport wrote:
> > Hi Shyam,
> >
> > On Wed, Jun 24, 2026 at 06:22:33PM -0700, Shyam Saini wrote:
> > > On 21 Jun 2026 13:36, Mike Rapoport wrote:
> > > > On Thu, Jun 18, 2026 at 11:23:31PM -0700, Shyam Saini wrote:
> > > > > reserve_mem relies on dynamic memory allocation, this limits the
> > > > > usecase where memory is required to be preserved across the boots.
> > > > > Eg: ramoops memory reservation on ACPI platforms
> > > > >
> > > > > So add support to pass a pre-determined static address and reserve
> > > > > memory at a specified location. This enables use case like ramoops
> > > > > on ACPI platforms to reliably access ramoops region with previous
> > > > > boot logs.
> > > > >
> > > > > Also skip the parsing of <align> when static address is passed.
> > > > >
> > > > > Example syntax for static address
> > > > > reserve_mem=4M@0x1E0000000:oops
> > > >
> > > > reserve_mem is best effort by design because such hacks as well as memmap=
> > > > cannot guarantee this memory is actually free.
> > > >
> > > > If you want to preserve ramoops reliably, use KHO with reserve_mem.
> > > > The first kernel will allocate memory, this memory will be preserved by KHO
> > > > and could be picked up by the second kernel.
> > >
> > > ok, On ARM64 DTS systems, we can reserve ramoops memory in the device tree during
> > > the warm reboot.
> >
> > The cc list actually implied x86 ;-)
> > Added arm64 folks now.
>
> Thanks for adding ARM folks, I had just included whatever get_maintainer script
> suggested, sorry.
> > > For an equivalent ARM64 ACPI platform, what is the recommended way to reserve
> > > and preserve that memory across the boots?
> >
> > I don't think it exists, but a command line option (be it memmap= or
> > reserve_mem=) does not seem the right way to me.
> >
> > Most of the arguments that were made against adding memmap= to arm64 [1]
> > apply here.
> >
> > If kexec is an option, KHO provides a reliable way to preserve memory
> > across boots.
> >
> > If kexec is not an option, we should look for a generic way to specify
> > something like DT's reserved_mem for ACPI/EFI systems.
> >
> > [1] https://lkml.kernel.org/lkml/20201118063314.22940-1-song.bao.hua@hisilicon.com/T/
> >
> Well, kexec is one of the option for my use case, it also requires
> memory reservation during warm reboot, I think memory can be reserved in
> the firmware but this will create a dependency on firmware for Linux
> reservation.
>
> It would be great to have a in kernel memory reservation mechanism for
> ARM64 ACPI platforms. I believe some other use cases like PMEM
> reservation would also benefit from this.
>
Following up on this, As Mike pointed that reserve_mem is best effort
reservation mechanism, so what is the recommended reliable Linux
mechanism, if any, to reserve a predetermined memory range during
early boot on ARM64/ACPI platforms for warm boot scenarios? KHO is
one option, but I'm specifically looking for a solution that preserves
the region across warm reboots.
Please let me know.
Thanks,
Shyam
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-30 17:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260619062331.348789-1-shyamsaini@linux.microsoft.com>
[not found] ` <aje-nY6QbwZP9XLG@kernel.org>
[not found] ` <ajyC2eX9MKSU84Z8@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
2026-06-25 8:37 ` [RFC v2 PATCH] reserve_mem: add support for static memory Mike Rapoport
2026-06-26 14:54 ` Shyam Saini
2026-06-30 17:09 ` Shyam Saini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox