Linux 6.1 was released
Summary: This release includes initial support for the Rust programming language; an optional MGLRU memory management algorithm that provides better memory management performance; a kernel memory sanitizer for improved memory safety debugging; memory tiering improvements; allow processes to voluntary collapse memory into a transparent hugepage; new BPF features such as a panic helper; better Btrfs performance overall; a Maple tree data structure with better algorithmic properties than red-black trees; support for per-cgroup Pressure Stall Information and a new IRQ/SoftIRQ PSI indicator. As always, there are many other features, new drivers, improvements and fixes.
Initial support for the Rust programming language
This release adds support for the Rust programming language. Rust aims to provide a modern system programming language with provable memory safety, without the use of a garbage collector, thus eliminating an entire class of bugs
This release includes some initial support for Rust, which will be improved in later releases.
Multi-generational LRU for better memory management
When programs try to use more memory than what it's available, the Linux kernel needs to take a decision about which parts of memory, and from which program(s), move to swap or evict from memory. This process decides the kernel’s caching policy and ability to overcommit memory.
The current memory management subsystem in Linux attempts to make the right decision by keeping LRU (Least Recently Used) lists of pages. However, this method does not always make the best decisions. The multi-generation LRU is an alternative LRU implementation that optimizes page reclaim and improves performance under memory pressure. This implementation does not replace the current memory management scheme, it can be configured at compilation time.
Another recommended LWN article
KMSAN, a kernel memory sanitizer
KMSAN is a dynamic error detector aimed at finding uses of uninitialized values. It is based on compiler instrumentation, and is quite similar to the userspace !MemorySanitizer tool.
An important note is that KMSAN is not intended for production use, because it drastically increases kernel memory footprint and slows the whole system down.
Support for KCFI, a forward-edge control-flow integrity scheme
Add support for KCFI, a forward-edge control-flow integrity scheme in the upcoming Clang 16 release, which is more suitable for kernel use than the existing CFI scheme used by CONFIG_CFI_CLANG. KCFI doesn't require LTO, doesn't alter function references to point to a jump table, and won't break function address equality. This replaces the current arm64 CFI implementation with KCFI and adds support for x86_64.
Memory tiering improvements
In modern systems, RAM can be distributed in several chips that can be accessed at a faster or slightly slower speed depending on the CPU accessing it. Modern systems are adding even more RAM tiers. This means that placement of a memory page that belongs to one node or another can severly impact performance.
This release includes a couple of improvements to the memory management subsystem. The first one is a new algorithm that helps to identify which pages are "hot" in a node so the system can promote/demote hot/cold pages to the appropriate nodes. The second change makes the tiering information available to userspace, and lets users configure it.
BPF features: panic helper, PKCS#7 signature verification, memory allocator
As usual, this release includes a few BPF features:
* Some debugging techniques require a memory dump, this release allows to trigger a panic from eBPF so that the memory state can be dumped at the right moment Recommended LWN article
* Because some type of BPF programs can attach to kprobe and fentry, they can run in unknown context where calling plain kmalloc() might not be safe. For this reason a small buffer of memory is reserved to allow allocation in these contexts Recommended LWN article
* There also other features, like functions PKCS#7 signature verification or an user-space-publisher ring buffer map type.
Maple trees, a more efficient tree data structure
The maple tree is an RCU-safe range based B-tree designed to use modern processor cache efficiently. There are a number of places in the kernel that a non-overlapping range-based tree would be beneficial, especially one with a simple interface. Users of an rbtree with other data structures to improve performance or an interval tree to track
non-overlapping ranges will benefit the most from maple trees.
Allow a process to induce collapsing of memory into transparent hugepages
This release provides a mechanism for userspace to induce a collapse of eligible ranges of memory into transparent hugepages in process context, thus permitting users to more tightly control their own hugepage utilization policy at their own expense. The proposed interface adds a new madvise(2) mode, {{{MADV_COLLAPSE}}}, and leverages the new {{{process_madvise(2)}}} call.
PSI improvements: per-cgroup PSI, IRQ/SoftIRQ PSI, optimizations
The Pressure Stall Information
Btrfs performance improvements
This release incorporates a few changes that will make Btrfs much faster when doing asynchronous buffered I/O using io_uring, also improved performance during normal buffered I/O, drastically faster lseek and FIEMAP (extent mapping information), preparations for a separate block group tree that will speed up mount times, improved inode logging (+25% faster dbench performance, -21% max latency), and other changes