A boot-time switch for slimming down the kernel's memory allocator on machines with very limited RAM is expected to be proposed for the Linux 7.5 kernel cycle, Phoronix reported. The feature, currently going by the name slab_tiny, would let administrators enable a cut-down allocator on a per-boot basis rather than baking the decision into a custom kernel build.
Nothing has been merged yet. The patch series is only anticipated for the 7.5 merge window, and the final name, semantics, and default behaviour remain subject to kernel review.
From build option to boot option
Today, administrators running SLUB on constrained hardware have one lever to pull: CONFIG_SLUB_TINY, a Kconfig option compiled into the kernel image at build time. A few months ago, a slub_tiny boot option was proposed as an alternative, and that work is now expected to be resubmitted under the new name slab_tiny for 7.5.
The distinction matters more than it might sound. A build-time option forces a choice before the kernel is even shipped: every system running that image gets the tiny allocator, or none do. A boot parameter moves that choice to the kernel command line, where it can be set or changed each time the machine starts.
That shift has three practical consequences. First, a single kernel image can serve a mixed fleet: the same build can boot with slab_tiny on a deliberately RAM-starved appliance and without it on a box with headroom to spare. Second, administrators can troubleshoot out-of-memory conditions live, toggling the parameter on the next reboot instead of triggering a rebuild and redeploy cycle. Third, the option can be dropped into minimal environments such as rescue shells or initramfs images, where a purpose-built kernel is rarely available.
Phoronix does not explain why the name moved from slub_tiny to slab_tiny, and no official patch series has yet landed to clarify the intent. The rename could reflect a change in scope, or simply a retitling. It may also cause some confusion: SLAB and SLUB are historically distinct allocators, so a parameter name beginning with slab_ invites questions about whether it targets the older allocator or SLUB's tiny mode. That will only become clear when the patches appear on the mailing lists.
Who actually needs it
For most Linux administrators, this is a non-event: the parameter will simply sit unused on the command line. The audience is narrow but real. Embedded engineers, appliance builders, distribution image maintainers, and admins keeping legacy or unusually low-memory hardware in service are the ones who will want to watch this patch series.
For that group, the appeal is straightforward. Today, deploying a CONFIG_SLUB_TINY kernel means committing an entire fleet to one allocator configuration. A runtime toggle converts that from a fleet-wide infrastructure decision into a per-machine boot argument, closer to how administrators already handle options like quiet, nomodeset, or init=.
The open technical questions worth tracking when the patches post: exactly what slab_tiny changes in allocator behaviour, how it interacts with CONFIG_SLUB_TINY when both are present, and what the default state will be if the parameter is omitted. A follow-up will be warranted if the series lands in 7.5 or changes materially during review.
Until then, the takeaway for anyone maintaining memory-constrained Linux systems is to keep an eye on the 7.5 merge window, and to resist rewriting provisioning scripts before the option actually exists.
Source: Phoronix, "Linux 7.5 To Introduce 'slab_tiny' Boot Option For Systems With Extremely Limited RAM."
據 Phoronix 報道,一個可在開機時縮減核心記憶體配置器(memory allocator)的開關,預料將在 Linux 7.5 核心開發週期中提出。該功能目前名為 slab_tiny,可讓系統管理員逐次開機啟用精簡版配置器,而毋須將此決定編入自訂核心編譯之中。
目前尚未有任何補丁被合入。補丁系列(patch series)只預計會在 7.5 合併視窗(merge window)期間提交,最終名稱、語義及預設行為仍須經核心審核確定。
由編譯選項變成開機選項
現時,在硬件資源受限的裝置上運行 SLUB 的系統管理員只有一個手段可用:CONFIG_SLUB_TINY,這是一個在編譯階段寫入核心映像(kernel image)的 Kconfig 選項。數月前,有建議提出以 slub_tiny 開機選項作為替代方案,而有關工作現預料會以新名稱 slab_tiny 在 7.5 重新提交。
這個分別聽起來可能微不足道,實則相當重要。編譯期選項迫使管理員在核心尚未發佈前就作出決定:所有運行該映像的系統都會採用 tiny 配置器,否則全部都不採用。開機參數則把這個選擇移到核心命令行(kernel command line),每次機器啟動時均可設定或更改。
這項轉變帶來三項實際影響。第一,單一核心映像可以服務混合部署的機群:同一個編譯版本既可以在刻意減少記憶體的 appliance 上以 slab_tiny 啟動,也可以在記憶體有餘裕的機器上不啟用。第二,系統管理員可以即時排查記憶體不足(out-of-memory)情況,在下次重啟時切換參數,而毋須觸發重新編譯及重新部署的流程。第三,該選項可以加入救援 shell(rescue shell)或 initramfs 映像等精簡環境,這類環境通常沒有專門編譯的核心可用。
Phoronix 未有解釋名稱為何由 slub_tiny 改為 slab_tiny,亦尚未有官方補丁系列落地以說明意圖。改名可能是反映範圍上的變化,也可能只是重新命名。這亦可能引起一些混淆:SLAB 和 SLUB 歷史上是兩種不同的配置器,因此以 slab_ 開頭的參數名稱,難免令人質疑它究竟是針對較舊的配置器,還是 SLUB 的 tiny 模式。這一點要等補丁在郵件列表(mailing list)上出現後才會明朗。
誰真正需要它
對大多數 Linux 系統管理員而言,這件事無關痛癢:該參數只會閒置在命令行上。目標群眾雖然狹窄,但確實存在。嵌入式工程師、appliance 開發者、發行版映像維護者,以及需要維持舊硬件或超低記憶體硬件運作的管理員,才會想留意這個補丁系列。
對這個群體來說,吸引力顯而易見。現時部署 CONFIG_SLUB_TINY 核心,意味著整個機群都要採用單一配置器設定。一個執行期開關可將此由全機群的基礎設施決定,轉變為逐台機器的開機參數,更貼近管理員現時處理 quiet、nomodeset 或 init= 等選項的方式。
補丁發佈後值得追蹤的技術問題包括:slab_tiny 究竟如何改變配置器行為、當它與 CONFIG_SLUB_TINY 同時存在時如何互動,以及省略該參數時的預設狀態為何。如果該補丁系列在 7.5 落地,或在審核期間有實質變更,就有必要再作跟進報道。
在那之前,所有維護記憶體受限 Linux 系統的人士,應留意 7.5 合併視窗,並在選項真正存在之前,切勿急於重寫部署腳本(provisioning script)。
資料來源:Phoronix,"Linux 7.5 To Introduce 'slab_tiny' Boot Option For Systems With Extremely Limited RAM."
