After two months of work, Linus Torvalds has announced the release ofand the new version of the Kernel of linux 6.13, which brings with it important advances and innovations. Among the main innovations it presents, it stands out a Lazy preemption model, which is positioned between voluntary and full modes, the inclusion of support for atomic writes on filesystems such as XFS and Ext4.
Other changes include the virtual-cpufreq driver, the new netlink net-shap APIer, and a tmpfs mount mode that is now case-sensitive, along with support for POSIX extensions in SMB3, and an AMD cache optimizer driver.
This new version has had the contribution of 2086 developers who made a total of 14,172 corrections, affecting 15,375 files and resulting in the addition of 598,707 lines of code, with the elimination of 406,294 lines.
Main news in Linux 6.13
Kernel 6.13, one of the most important changes It is the introduction of the "fine-grained timestamps" mechanism which improves the accuracy of obtaining data on file modifications or accesses, achieving an accuracy of over a millisecond without negatively affecting performance.
Another new feature of the Linux Kernel 6.13 is the ssupport for atomic writes, which ensures that data larger than the size of a sector is written atomically on devices that support this feature. Currently, this functionality It is available on file systems like XFS, Ext4 in O_DIRECT mode, and in RAID 0/1/10 configurations with md.
As far as other file systems are concerned, Linux 6.13 marks the final elimination of ReiserFS, EROFS now supports the SEEK_HOLE and SEEK_DATA options in lseek(), while F2FS has added support for device aliasessy XFS has added support for real-time device quotas and improved management of metadata directories. In addition, SMB3 now supports POSIX extensions required for storing special files, such as symbolic links and device files.
In memory and system services, the new lazy preference model (PREEMPT_LAZY). This model allows to maintain preemption capabilities complete for real-time tasks, while delaying preemption of normal tasks until the tick boundary. In addition, the model simplifies the task scheduler logic by removing handlers from other parts of the kernel from its scheduling process.
Regarding compilation optimizations, support for AutoFDO optimizations when compiling with Clang has been integrated, Using run profiles to tune code and improve performance, latency has been shown to be reduced by 10%. A new flag has also been added to the madvise() system call to improve process memory management. The MADV_GUARD_INSTALL flag allows specific page guard addresses to be overridden, avoiding access exceptions (SIGSEGV) without allocating new virtual memory areas.
IO_uring has also received several improvements, including the ability to resize buffers, send messages in synchronous mode between ring buffers, and partially clone buffers. Additionally, hybrid I/O polling has been implemented and the API for registering ring buffers and memory areas has been extended.
As for the hardware improvements, added the ability to detect split-locks on AMD CPUs, a phenomenon that occurs when data is not properly aligned in memory and crosses two cache lines, which can severely impact performance. To mitigate this issue, the AMD Cache Optimizer driver has been integrated, which leverages AMD 3D V-Cache technology to improve the performance of individual CPU cores, either by increasing the size of the available L3 cache or by increasing the frequency.
For architectures MIPS, support has been added for systems with multiple interrupt controllers. clusters, providing an independent interrupt handler for each CPU cluster. A new ioctl operation, PIDFD_GET_INFO, has also been implemented that allows information about a process to be obtained using its PIDFD identifier, which remains constant even if the associated PID changes when the process exits.
En ARM, key advances include support for running Linux in virtual machines protected by the Arm Confidential Computing Architecture, as well as support for shadow stacks in user space, improving security. A new reference counting mechanism for files, achieving greater scalability.
El Task Scheduler now supports a proxy execution mechanism, solving the priority inversion problem. This mechanism prevents low-priority tasks from holding up resources needed by high-priority (real-time) tasks by blocking them. In addition, the scheduling and execution contexts of the processes have been separated.
On the other hand, it highlights the Migrating changes related to the use of Rust in the development of drivers and kernel modules. Although Rust support is not enabled by default, bindings and data structures have been added to allow writing controllers in this language, including support for event tracking and the Binder controller rewritten in Rust.
The subsystem BPF has been improved with the implementation of a separate stack for BPF programs, which reduces the risk of overflows when processing large call chains. The ability to send signals to other processes and to use shared memory in BPF maps has also been added, facilitating load communication between task scheduler drivers.
Furthermore, the Exception tracking has been improved to generate page faults when tracepoints are enabled on system calls, allowing passed parameters to be read from user space. The transparent_hugepage_shmem parameter has also been added to control the use of large memory pages on tmpfs and shmem filesystems.
In networks, it is introduced support for suspending NAPI during inactivity, improving power consumption, and a new network device API that facilitates advanced configuration of transmitting (TX) hardware. Additionally, io_uring has received several optimizations that improve the handling of asynchronous input/output operations.
Finally, it has been implementedReal-time support for Loongarch architecture and new extensions to the RISC-V architecture, allowing pointers to be masked in user space. To improve kernel image compression, the default algorithm has been changed to lz4, replacing lz4c.
If you are interested in learning more about this, you can check the details In the following link.