Skip to content

Commit 53e5b47

Browse files
author
Gregory Price
committed
Linus Early Boot: Memory-Tier and CMA
1 parent d698747 commit 53e5b47

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

doc/linux/early-boot.rst

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,29 @@ during driver configuration.
101101

102102
Nodes are only marked :code:`N_MEMORY` if they have *online* memory.
103103

104+
Tier membership can be inspected in ::
105+
106+
/sys/devices/virtual/memory_tiering/memory_tierN/nodelist
107+
0-1
108+
109+
If nodes are grouped which have clear difference in performance, check the HMAT
110+
and CDAT information for the CXL nodes. All nodes default to the DRAM tier,
111+
unless HMAT/CDAT information is reported to the memory_tier component via
112+
`access_coordinates`.
113+
104114
Contiguous Memory Allocation
105115
============================
106-
todo: explain limitations
116+
The contiguous memory allocator (CMA) enables reservation of contiguous memory
117+
regions on NUMA nodes during early boot. However, CMA cannot reserve memory
118+
on NUMA nodes that are not online during early boot. ::
119+
120+
void __init hugetlb_cma_reserve(int order) {
121+
if (!node_online(nid))
122+
/* do not allow reservations */
123+
}
124+
125+
This means if users intend to defer management of CXL memory to the driver, CMA
126+
cannot be used to guarantee huge page allocations. If enabling CXL memory as
127+
SystemRAM in `ZONE_NORMAL` during early boot, CMA reservations per-node can be
128+
made with the :code:`cma_pernuma` or :code:`numa_cma` kernel command line
129+
parameters.

0 commit comments

Comments
 (0)