Linux 6.8 Continues Work For Clearing The sysctl Sentinel Bloat

Written by Michael Larabel in Linux Kernel on 11 January 2024 at 06:26 AM EST. 3 Comments
LINUX KERNEL
Linux 6.8 is continuing the work toward allowing the sysctl sentinel to be removed, the final empty element on sysctl arrays. This ongoing effort will in turn allow for saving an extra 64 bytes on each sysctl array and will enhance the build time size of the kernel.

Back during Linux 6.6 this work began for removing ~64 bytes of bloat per array and the work continued in Linux 6.7. Now for Linux 6.8 there is further work on this quest but finishing up work on eliminating the sysctl sentinel isn't expected to be finished until Linux 6.9.

The sentinel


Luis Chamberlain explained with the sysctl changes for Linux 6.8:
"To help make the move of sysctls out of kernel/sysctl.c not incur a size penalty sysctl has been changed to allow us to not require the sentinel, the final empty element on the sysctl array. Joel Granados has been doing all this work. On the v6.6 kernel we got the major infrastructure changes required to support this. For v6.7 we had all arch/ and drivers/ modified to remove the sentinel. For v6.8-rc1 we get a few more updates for fs/ directory only. The kernel/ directory is left but we'll save that for v6.9-rc1 as those patches are still being reviewed. After that we then can expect also the removal of the no longer needed check for procname == NULL.

Let us recap the purpose of this work:

- this helps reduce the overall build time size of the kernel and run time memory consumed by the kernel by about ~64 bytes per array
- the extra 64-byte penalty is no longer incurred now when we move sysctls out from kernel/sysctl.c to their own files"

Hopefully this work gets wrapped up for v6.9 this spring.
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