Linux 6.12 Adds A Kernel Stack Usage Histogram To Help With Optimizations

Written by Michael Larabel in Linux Kernel on 24 September 2024 at 08:57 AM EDT. Add A Comment
LINUX KERNEL
Merged as part of the memory management "MM" changes for the Linux 6.12 kernel is a kernel stack usage histogram to help developers in better optimizing the kernel stack sizes and minimizing memory waste.

On Linux 6.12+ with a grep kstack /proc/vmstat there is a break down of the kernel stack usage in power-of-two buckets. This histogram was added to the kernel with fleets of "millions of machines" on the mind. For hyperscalers and others with vast deployments of Linux servers, small optimizations to memory use can make a profound impact.

kernel stack histogram example


This is beneficial to efforts around the dynamic kernel stack efforts and hyperscalers/CSPs with the resources to pursue relentlessly optimizing the Linux kernel.

memory stack


The full list of MM updates for the Linux 6.12 kernel can be found via this pull request that has already been merged to Linux Git.
Related News
About The Author
Michael Larabel

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