[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/3] x86/EFI: replace ebmalloc()



On Thu, Nov 13, 2025 at 01:53:40PM +0100, Jan Beulich wrote:
> On 13.11.2025 13:40, Marek Marczykowski wrote:
> > On Thu, Nov 13, 2025 at 12:09:37PM +0100, Jan Beulich wrote:
> >> Use the new brk_alloc() instead, with ebmalloc() merely being a thin
> >> wrapper.
> >>
> >> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> >> ---
> >> I'm not quite certain whether we ought to permit non-page-granular
> >> reservations. The in-memory image being somewhat larger due to possibly
> >> excessive padding isn't really a big problem, I think.
> > 
> > My grep says ebmalloc is used in just two places:
> > 1. For efi_memmap (via efi_arch_allocate_mmap_buffer())
> > 2. For various cmdline options and module names (via aplace_string())
> > 
> > The second one is probably undesirable to allocate full page for each
> > one. On the other hand, the current approach (putting small allocations
> > at the same page as an earlier page-aligned one) also has its issues -
> > see comments on 3/3 patch.
> 
> Imo if such sharing of a page is unwanted, then it's the side caring about
> the non-sharing which ought to request an exact multiple of pages. Wasting
> space due to doing this in the BRK implementation is undesirable.

Makes sense.

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

Attachment: signature.asc
Description: PGP signature


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.