News: 0001659833

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

"slab_tiny" Boot Option Proposed For Tiny Linux Systems With Very Limited RAM

([Linux Kernel] 6 Hours Ago slab_tiny)


In 2022 [1]the SLOB allocator was deprecated and [2]removed with Linux 6.4 a year later. SLOB was popular with embedded systems with minimal amounts of RAM, so as a result the CONFIG_SLUB_TINY Kconfig option was then added for configuring the slab allocator for a minimal memory footprint for systems with 16MB of RAM or less. The CONFIG_SLUB_TINY is now on the chopping block with a proposed rework to the allocator code for making the "tiny" memory handling a boot time option.

SUSE's Vlastimil Babka sent out the patch series today for replacing the CONFIG_SLUB_TINY with a boot-time "slab_tiny" parameter for achieving much of the same impact. CONFIG_SLUB_TINY would be deprecated while the "slab_tiny" boot parameter would control the functionality while ultimately making the code simpler and cleaned up.

There are some parts of the code that couldn't be transformed to be boot-time controlled like dead code elimination and fast path inlining, merging of non-kmalloc reclaimable and unreclaimable caches, and ignoring SLAB_NO_MERGE for performance reasons. But the memory savings from those are said to be relatively minor.

[3]This RFC patch series lays out the code for introducing the slab_tiny Linux boot option.

The slab_tiny option is only intended for use by embedded Linux systems with extremely limited memory. Using slab_tiny on larger Linux systems to try to save RAM isn't recommended due to the impact on SMP scalability by disabling per CPU object caching.



[1] https://www.phoronix.com/news/Linux-6.2-SLOB-Deprecated

[2] https://www.phoronix.com/news/Linux-6.4-Dropping-SLOB

[3] https://lore.kernel.org/lkml/20260923-slub_tiny_rework-v1-0-a0e66d536eb5@kernel.org/



"Your mother was a hamster, and your father smelt of elderberries!"
-- Monty Python and the Holy Grail