Re: [PATCH 09/12] memblock: introduce MEMBLOCK_KHO_SCRATCH_EXT
From: Mike Rapoport
Date: Tue Jun 02 2026 - 09:21:44 EST
On Tue, Jun 02, 2026 at 02:52:02PM +0200, Pratyush Yadav wrote:
> On Sun, May 31 2026, Mike Rapoport wrote:
> >> >
> >> > If we want to keep the naming aligned with the existing codebase for now:
> >> > MEMBLOCK_KHO_SCRATCH -> original scratch
> >> > MEMBLOCK_KHO_UNPRESERVED -> for the new memory (instead of SCRATCH_EXT)
> >>
> >> UNPRESERVED sounds good to me. I will use that for the next revision
> >> unless Mike objects.
> >
> > Can we make it shorter? ;-)
> >
> > UNPRESERVED makes sense, although I'd love to completely remove KHO_ notion
> > and make the name reflect how it's used by memblock. I was toying with
> > PREFERRED instead of SCRATCH, but it didn't feel right enough.
> > With two of them that surely won't work :)
>
> I don't think you really can remove KHO_ notion. These memory regions
> only make sense on a KHO boot, and won't exist otherwise. And PREFERRED
> sounds like a suggestion/priority hint, not a hard limit. "With KHO
> boot, you can _only_ use PREFERRED memory", doesn't sound right...
>
> I think MEMBLOCK_KHO_BOOTMEM for scratch and MEMBLOCK_KHO_NOPRESERVE
> (which I think is a tiny bit better than UNPRESERVED) for scratch_ext
> are my top picks. To make it shorter, perhaps MEMBLOCK_KHO_NOPRSRV, in
> similar fashion to RSRV_KERN?
There are a couple of unrelated 'bootmem' things in the kernel, adding
another one shouldn't hurt :)
I like MEMBLOCK_KHO_BOOTMEM and MEMBLOCK_KHO_NOPRSRV the most.
> >> would like this series to not get muddled in the naming discussion. I
> >> will use UNPRESERVED for the new concept in v2 though.
> >
> > That might warrant v3 even if everything else is perfect :)
>
> I can live with that. As long as we can agree on the easy part (the
> code), I don't mind doing another version for the hard part (the naming)
> ;-)
It makes sense to keep KHO_SCRATCH for now and use MEMBLOCK_KHO_NOPRSRV for
the new one to begin with. And then we can ask an LLM do the renaming.
> --
> Regards,
> Pratyush Yadav
--
Sincerely yours,
Mike.