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 <[email protected]>
>> ---
>> 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.

Jan

Reply via email to