Proposal To Set ARM64 Kernel Stack Size At Boot Time To Reduce Memory Consumption

Written by Michael Larabel in Linux Kernel on 30 September 2026 at 06:27 AM EDT. 3 Comments
LINUX KERNEL
A proposal was posted this week to the Linux kernel mailing list by a Google engineer to make it easier for ARM64 Linux to adjust the kernel stack size. The motivation for doing so to configure the kernel stack size during boot time is on reducing system memory consumption.

Google's Mostafa Saleh posted a request for comments (RFC) to the Linux kernel mailing list with a set of 15 patches that would allow optionally setting the kernel stack size from the command line. This would make it easy to adjust the kernel stack size without having to rebuild the kernel.

RAM phone


By more easily adjusting the kernel stack size they can avoid memory waste, especially on Android and other environments. The proposal notes:
"On some systems (specifically, Android), this provides a mechanism to reduce the kernel memory consumption, as the default kernel stack size of 16kB (with 4kB pages) can result in ~100MB of allocated memory, despite the fact that most threads do not come close to exhausting their allocation."

As part of this work is also allowing a 12kB stack size too if needing more than 8kB but less than the 16kB default. Another idea to potentially be pursued is allowing per-task stack sizes for helping to reduce memory usage depending upon the task.

With these patches, the stack size could be adjusted via the kernel_stack_pages= option at boot time. For now at least it's an ARM64 only proposal.

The topic will be discussed further next week at the Linux Plumbers Conference. Those wishing to learn more can see this RFC patch series.
Related News
About The Author

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week