Linus Torvalds Begins The Linux 6.11 Merge Window By Merging Some Of His Own Code
([Linux Kernel] 6 Hours Ago
Torvalds Coding)
- Reference: 0001478778
- News link: https://www.phoronix.com/news/Torvalds-Runtime-Const-6.11
- Source link:
Linus Torvalds began the Linux 6.11 merge window yesterday by merging some of his own feature code for this next kernel version.
These days Linus Torvalds doesn't often have time to code too much new feature work himself in overseeing other kernel maintainers, chiming in on Linux kernel mailing list discussions, and other work. But in kicking off the Linux 6.11 merge window he did end up landing some of his own kernel improvements.
The first new merges for Linux 6.11 were his branches on [1]runtime-constants , [2]word-at-a-time , [3]arm64-uaccess , and [4]link_path_walk .
Torvalds explained in the new runtime constants code:
"This is one of four branches that came out of me looking at profiles of my kernel build filesystem load on my 128-core Altra arm64 system, where pathname walking and the user copies (particularly strncpy_from_user() for fetching the pathname from user space) is very hot.
This is a very specialized "instruction alternatives" model where the dentry hash pointer and hash count will be constants for the lifetime of the kernel, but the allocation are not static but done early during the kernel boot. In order to avoid the pointer load and dynamic shift, we just rewrite the constants in the instructions in place.
We can't use the "generic" alternative instructions infrastructure, because different architectures do it very differently, and it's actually simpler to just have very specific helpers, with a fallback to the generic ("old") model of just using variables for architectures that do not implement the runtime constant patching infrastructure."
These patches have been [5]discussed on the kernel mailing list the past few weeks. These improvements stem from his profiling on his Ampere Altra Max 128-core ARM workstation and discovering some less than ideal areas of the ARM64 kernel code.
So it looks like Ampere Computing's decision to [6]send Linus Torvalds an Ampere Altra Max system is indeed paying off for upstream Linux kernel optimizations for ARM64.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a5819099f601c1af5b86b1f5921a56859e45b19a
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6a31ffdfed10dc48e6fd1775d50c22429382ab98
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1654c37ddbfce5d50bc2895d7ea9c5e0edcc4d77
[4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5e0497553643b6c6acd16c389afb9cec210f4ea9
[5] https://lore.kernel.org/all/20240610204821.230388-1-torvalds@linux-foundation.org/
[6] https://www.phoronix.com/news/Linus-Torvalds-Ampere-More-ARM
These days Linus Torvalds doesn't often have time to code too much new feature work himself in overseeing other kernel maintainers, chiming in on Linux kernel mailing list discussions, and other work. But in kicking off the Linux 6.11 merge window he did end up landing some of his own kernel improvements.
The first new merges for Linux 6.11 were his branches on [1]runtime-constants , [2]word-at-a-time , [3]arm64-uaccess , and [4]link_path_walk .
Torvalds explained in the new runtime constants code:
"This is one of four branches that came out of me looking at profiles of my kernel build filesystem load on my 128-core Altra arm64 system, where pathname walking and the user copies (particularly strncpy_from_user() for fetching the pathname from user space) is very hot.
This is a very specialized "instruction alternatives" model where the dentry hash pointer and hash count will be constants for the lifetime of the kernel, but the allocation are not static but done early during the kernel boot. In order to avoid the pointer load and dynamic shift, we just rewrite the constants in the instructions in place.
We can't use the "generic" alternative instructions infrastructure, because different architectures do it very differently, and it's actually simpler to just have very specific helpers, with a fallback to the generic ("old") model of just using variables for architectures that do not implement the runtime constant patching infrastructure."
These patches have been [5]discussed on the kernel mailing list the past few weeks. These improvements stem from his profiling on his Ampere Altra Max 128-core ARM workstation and discovering some less than ideal areas of the ARM64 kernel code.
So it looks like Ampere Computing's decision to [6]send Linus Torvalds an Ampere Altra Max system is indeed paying off for upstream Linux kernel optimizations for ARM64.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a5819099f601c1af5b86b1f5921a56859e45b19a
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6a31ffdfed10dc48e6fd1775d50c22429382ab98
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1654c37ddbfce5d50bc2895d7ea9c5e0edcc4d77
[4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5e0497553643b6c6acd16c389afb9cec210f4ea9
[5] https://lore.kernel.org/all/20240610204821.230388-1-torvalds@linux-foundation.org/
[6] https://www.phoronix.com/news/Linus-Torvalds-Ampere-More-ARM
varikonniemi