Multi-socket and cloud servers rely on memory being allocated close to the CPU sockets that use it — but during early boot, the Linux kernel still carves up available memory before full NUMA topology information is in play. The result can be allocations that sit on the "wrong" node from a locality standpoint, quietly degrading performance on machines where the distance between sockets actually matters.
A new patch series posted to the Linux kernel mailing list on 2 December proposes a fix. Dubbed "Extmem," the series is a NUMA-aware boot memory carving solution developed by Google engineers, and was surfaced by Phoronix on 3 December.
The problem Extmem targets sits in one of the least glamorous corners of the kernel: memblock, the early-boot allocator that manages memory before the page allocator and the full NUMA logic take over. Because NUMA topology is not yet fully resolved at that stage, per-node memory partitioning ends up approximate rather than deliberate. Kernel developers have historically addressed such imbalances with incremental fixes, and memblock is widely viewed within the community as a persistent source of complexity in the boot path — but Extmem's authors are proposing a structural change rather than another patch on top of the existing scheme.
It is important to be precise about where this stands. Extmem is an exploratory proposal under discussion on a public mailing list. It is not in mainline Linux, has not been merged into any release, and has not cleared review by the memory-management maintainers. Nothing about the current state of the series changes what is shipping on servers today.
That distinction matters for a couple of reasons. First, LKML review cycles for memory-management reworks are long and often contentious; series like this frequently come back in revised versions, get partially adopted, or are dropped entirely. Second, the technical stakes are high enough that the discussion is worth reading on its own merits — any change to how memory is divided during boot touches everything that runs afterward.
For Hong Kong IT professionals running multi-socket bare-metal hosts or provisioning cloud instances on NUMA-sensitive workloads, the story is one to watch rather than act on. There is no production impact from an unmerged proposal. If the series advances, the practical questions will be familiar ones: whether the new carving logic changes the memory layout that performance tuning and affinity settings assume, and whether the behaviour differs between kernel releases. Those are the signals to track — a v2 series, or explicit buy-in from the mm maintainers — rather than the initial patch dump itself.
Until then, Extmem is best read as an indication of where one large-scale operator thinks the boot-time memory path needs to go, and as a useful primer on a boot-phase allocation problem that has followed Linux for a long time.
Source: Phoronix, "Google Engineers Exploring 'Extmem' For Linux NUMA-Aware Boot Memory Carving," 3 December; original patch series posted to the Linux kernel mailing list.
多插槽及雲端伺服器依賴記憶體分配在靠近使用它的 CPU 插槽的位置——但在早期開機階段,Linux 核心在完整的 NUMA 拓撲資訊尚未生效之前,仍然會先行分割可用記憶體。其結果可能是分配落在從本機性(locality)角度而言「錯誤」的節點上,在插槽之間距離確實會構成影響的機器上無聲地削弱效能。
一組新的 patch series 於 12 月 2 日提交至 Linux 核心郵件列表(LKML),提出了解決方案。這組名為「Extmem」的 patch series 由 Google 工程師開發,是一套 NUMA 感知的開機記憶體分割方案,並於 12 月 3 日由 Phoronix 首度披露。
Extmem 所針對的問題,位於核心中最不起眼的角落之一:memblock——這個早期開機分配器負責在 page allocator 及完整 NUMA 邏輯接手之前管理記憶體。由於在該階段 NUMA 拓撲尚未完全解析,各節點的記憶體分區最終只是近似而並非刻意為之。核心開發者過往以漸進式修正處理此類不平衡,而 memblock 在社區內普遍被視為開機路徑中持續產生複雜性的根源——但 Extmem 的作者提出的是結構性改變,而非在現有方案之上再加一個 patch。
有必要準確說明此事目前的進展。Extmem 是一項在公開郵件列表上討論中的探索性提案。它並未進入 mainline Linux,未被合併到任何版本,亦未通過 memory-management 維護者的審核。這組 patch series 目前的狀態,對現今出貨伺服器上運行的內容沒有任何改變。
這個區分之所以重要,有幾個原因。首先,LKML 就 memory-management 重整方案的審核週期漫長且往往充滿爭議;此類 patch series 經常以修訂版本重新出現、被部分採納,或最終被完全放棄。其次,技術上的影響足夠重大,相關討論值得憑其本身價值閱讀——任何關於開機期間記憶體如何劃分的變動,都會觸及其後運行的一切。
對於營運多插槽裸金屬主機、或在對 NUMA 敏感的負載上配置雲端實例的香港 IT 專業人士而言,這則新聞屬於值得觀察而非即時行動的事項。一個未被合併的提案不會帶來任何生產環境影響。若該 patch series 推進一步,實際問題將是熟悉的那些:新的分割邏輯是否改變效能調校及 affinity 設定所依賴的記憶體佈局,以及其行為在不同核心版本之間是否存在差異。這些才是值得追蹤的訊號——例如 v2 版本的出現,或 mm 維護者明確的支持——而非最初的 patch dump 本身。
在此之前,Extmem 最適合被視為一個指標,顯示一家大型營運商認為開機階段的記憶體路徑應如何發展,同時也是一份有用的入門讀物,介紹一個長期困擾 Linux 的開機階段記憶體分配問題。
資料來源:Phoronix,〈Google Engineers Exploring 'Extmem' For Linux NUMA-Aware Boot Memory Carving〉,12 月 3 日;原始 patch series 已提交至 Linux 核心郵件列表。
