KernelNewbies:

Linux 5.16 was released on Sun, 9 Jan 2022.

Summary: This release adds a new futex_waitv syscall that can speeds up games by letting them wait for multiple futexes with a single system call; a file system health reporting API baed on fanotify; introduction of the concept of "memory folios", which speeds up some memory management areas significantly; support in the task scheduler for CPU "clusters" that share some L2/L3 cache; support for Intel AMX instructions; support for DAMON-based proactive memory reclamation and improved write congestion management. As always, there are many other features, new drivers, improvements and fixes.

1. Prominent features

1.1. New futex_waitv() system call for faster game performance

This release adds a new system call, futex_waitv(2), which allows to wait on multiple futexes with a single system call. The main use case is emulating Windows' WaitForMultipleObjects call, which allows software like Proton to improve the performance of Windows Games. Native Linux games can also benefit from this interface as this is a common wait pattern for this kind of applications.

Recommended LWN article: Short subjects: Realtime, Futexes, and ntfs3

Documentation: Documentation/userspace-api/futex2.rst

1.2. File system health reporting through fanotify

This release adds a new FAN_FS_ERROR fanotify event type for file system-wide error reporting. It is meant to be used by file system health monitoring daemons, which listen for these events and take actions (notify sysadmin, start recovery) when a file system problem is detected. It tries to report only the first error that occurred for a file system since the last notification, and it simply counts additional errors. This ensures that the most important pieces of information are never lost. Right now, the only file system that supports this interface is Ext4.

Documentation: Documentation/admin-guide/filesystem-monitoring.rst

1.3. Memory folios infrastructure for a faster memory management

To manage the system's memory, the available RAM is split into small units, called pages. The size of these pages vary depending on the architecture, but on x86 systems it's KB. In modern systems with several tens of GB, such small page size equals to a vast amount of pages, which are difficult to manage. To solve this problem, the Linux kernel developed the concept of compound pages, which are page structures that can contain more than one physical page. But the way these compound pages work is not clear, and it has bug-prone APIs that also introduce some overhead all across the kernel.

This release introduces the concept of page folios, which are like compound pages, but with better semantics. Using page folios in some core parts of the kernel brings some performance improvements in common workloads. This release will include the core infrastructure of page folios and converts some parts of the core memory management subsystem and the page cache. Future releases will convert some file systems and introduce multi-page folios.

Recommended LWN articles: Clarifying memory management with page folios, and The folio pull-request pushback

1.4. Add cluster scheduler support to the task scheduler

Some machines have a level of hardware topology in which some CPU cores, typically 4 cores, share L3 tags (e.g. ARM's Kunpeng 920) or L2 cache (e.g. x86's Jacobsville). Awareness of this special topology can drastically improve the task scheduling decisions: spreading those tasks between clusters will bring more memory bandwidth and decrease cache contention (but this isn't always a win: packing tasks might help decrease the latency of cache synchronization). This release adds support for cluster typologies to the task scheduler.

1.5. Add support for AMX instructions

This release adds support for Intel's Advanced Matrix Extensions (AMX). These extensions will be shipping on servers soon. AMX consists of configurable TMM "TILE" registers plus new CPU instructions that operate on them. TMUL (Tile matrix MULtiply) is the first operator to take advantage of the new registers, and additional instructions will be added in the future.

Because of the size that this new extension would add to the signal stack of each task, it requires using a new arch_prctl(2) mechanism to read the supported features and request permission for dynamically enabling it for the calling process and its children.

1.6. DAMON-based proactive memory reclamation, operation schemes and physical memory monitoring

Following up the merge of DAMON in Linux 5.15, this release adds support for a few DAMON-based features:

1.7. Improve write congestion

When a process writes lots of data and the disk can't keep up (i.e. it's "congested"), the process must not be allowed to continue making more write requests until the current write requests are completed. The mechanisms used to signal when congestion is happening is completely broken and is being replaced with a new approach.

Recommended LWN article: Replacing congestion_wait()

2. Core (various)

3. File systems

4. Memory management

5. Block layer

6. Tracing, perf and BPF

7. Virtualization

8. Cryptography

9. Security

10. Networking

11. Architectures

11.1. ARM

11.2. x86

11.3. RISC-V

11.4. S390

11.5. MIPS

11.6. PA-RISC

11.7. PowerPC

12. Drivers

12.1. Graphics

12.2. Power Management

12.3. Storage

12.4. Drivers in the Staging area

12.5. Networking

12.6. Audio

12.7. Tablets, touch screens, keyboards, mouses

12.8. TV tuners, webcams, video capturers

12.9. Universal Serial Bus

12.10. Serial Peripheral Interface (SPI)

12.11. Watchdog

12.12. Voltage, current regulators, power capping, power supply

12.13. Real Time Clock (RTC)

12.14. Pin Controllers (pinctrl)

12.15. Multi Media Card (MMC)

12.16. Memory Technology Devices (MTD)

12.17. Industrial I/O (iio)

12.18. Multi Function Devices (MFD)

12.19. Inter-Integrated Circuit (I2C + I3C)

12.20. Hardware monitoring (hwmon)

12.21. General Purpose I/O (gpio)

12.22. Leds

12.23. DMA engines

12.24. Cryptography hardware acceleration

12.25. PCI

12.26. FRU Support Interface (FSI)

12.27. Clock

12.28. PHY ("physical layer" framework)

12.29. Various

13. List of Pull Requests

14. Other news sites

KernelNewbies: Linux_5.16 (last edited 2022-03-20 23:16:30 by diegocalleja)