Re: [RFC] mm: alloc__by: create a function for allocate pages in small microsseconds in boards no-MMU
From: David Hildenbrand (Arm)
Date: Fri Nov 20 2026 - 03:57:38 EST
On 11/20/26 07:08, dev12124 wrote:
>
> Hi memory subsystem,
>
> Actually, boards no-MMU do not have an integrated MMU to translate
> physical to virtual addresses or support hardware paging and; for this, a
> few points:
>
> I. Requirement for Contiguous Memory
> Without an MMU, the kernel cannot combine scattered physical blocks to
> simulate a continuous space, making the search for and allocation of
> larger blocks very slow due to fragmentation.
>
> II. Demand Paging
> The system cannot defer physical allocation via page faults; instead, it
> must reserve entire blocks in advance.
>
> III. Use of simplified allocators
> such as SLUB_TINY or linear free-list scans (instead of the standard
> SLUB); it saves space by
> scanning simple lists of blocks, but it performs very slowly during
> allocation.
>
> IV. Proposed approach
> The function alloc_by(size, address_initial, flag) haves:
> * pre-reserved pool per size order;
> * cache fast-path no global lock;
> * bitmap O(1) of free contiguous blocks.
> This bitmap, more specifically the blocks, have the pre-reserved pool (per
> size order)and the pool have word 2:
> * Word 1: The initial address (starts in cache fast-path)
> * Word 2: The final address.
> For example, a Program allocates 277 bytes, the alloc_by() enter and
> verify the bitmap -> viewing the request is 277 bytes, the aproximated
> size is 512 bytes and alloc_by alloc 512 bytes.
Hi,
I think we are much rather looking into removing NOMMU then optimizing it :)
--
Cheers,
David