On Tue, Feb 18, 2025 at 09:49:28AM -0800, Yang Shi wrote:
On Mon, Feb 17, 2025 at 12:05 PM Gregory Price <gourry@xxxxxxxxxx> wrote:
The node ID passed in as an argument is a "preferred node", which means
is insufficient space on that node exists to service the GFP_KERNEL
allocation, it will fall back to another node.
If all hot-plugged memory is added to ZONE_MOVABLE, two things occur:
1) A portion of the memory block is carved out for to allocate memmap
data (reducing usable size by 64b*nr_pages)
2) The memory is allocated on ZONE_NORMAL on another node..
Nice write-up, thanks for putting everything together. A follow up
question on this. Do you mean the memmap memory will show up as a new
node with ZONE_NORMAL only besides other hot-plugged memory blocks? So
we will actually see two nodes are hot-plugged?
No, it creates 1 ZONE_MOVABLE memory block of size
(BLOCK_SIZE - memmap_size)
and as far as i can tell the actual memory map allocations still
occur on ZONE_NORMAL (i.e. not CXL).
So you just lose the capacity, it's just stranded and unused.