News › linux
By The Linux Camp News, September 30, 2026
A 15-patch proposal would let ARM64 kernels allocate smaller stacks without rebuilding for each adjustment. The selected size would stay fixed during runtime, rather than grow on demand.
Google's Mostafa Saleh submitted a 15-patch request for comments on September 28, 2026, proposing boot-time kernel stack sizing for ARM64 Linux. Instead of rebuilding the kernel for each size adjustment, engineers could select a size through the kernel command line. In the sources retrieved September 30, this is a proposal for review, not an established shipping feature; no merge confirmation or release version is supplied. 2 1
Android supplies the concrete motivation. Saleh says the default 16kB kernel stacks on systems using 4kB pages can collectively consume about 100MB, although most threads use much less than their allocation. Smaller allocations target that unused capacity. The 100MB figure describes existing stack allocation on some systems, not measured savings from these patches or memory that could all be recovered. 2
The mechanism separates virtual address space from the memory backing it. THREAD_SIZE describes the stack's virtual extent; the proposal allows only part of that extent to receive backing memory. Allocating fewer backing pages reduces memory consumption without shrinking the virtual extent. Crucially, this is not an automatically expanding stack: the boot-selected size remains fixed during runtime and applies system-wide, with an allocation exception for init_task. 2
That exception does not provide extra usable stack space. init_task retains a full allocation because its stack is statically allocated, but exception-entry overflow checks still enforce the configured size. Selecting different sizes for individual tasks is listed as future work, rather than a capability of this RFC. 2
The series would also offer a 12kB stack, an intermediate choice between 8kB and the 16kB default. Integration depends on separate ARM work moving the overflow stack to sp_el1 so early exception handling can use it without overwriting registers. That prerequisite matters to anyone evaluating the patches: this is not presented as an isolated boot-parameter addition. 1 2
For an evaluation kernel incorporating the proposal, Phoronix identifies the intended control as kernel_stack_pages=. Before planning boot-configuration changes, check that the kernel actually includes the feature and consult its parameter documentation. The supplied cover letter and coverage do not establish accepted values, invalid-value handling or distribution availability, so they are insufficient for a deployment recipe. 1
Saleh reports testing on a Qualcomm X1-based Lenovo Mini-x gen 10 with 4kB-page kernels using 16kB, 8kB and 12kB stacks, plus a 64kB-page kernel using a 64kB stack. Workloads included KVM virtual machines, stress-ng and LKDTM, with stack-related debugging configurations enabled. This is author-reported testing, not independent validation; the supplied results do not quantify memory savings or establish a safe smaller size for other workloads. 2