KernelNewbies:

Linux 5.12 has been released on Sun, 25 Apr 2021.

Summary: This release allows to map an UID to a different one in a mount; it also adds support for selecting the preemption model at runtime; support for a low-overhead memory error detector designed to be used in production; support for the ACRN hypervisor designed for embedded systems; Btrfs initial support for zoned devices, subpage blocks sizes and performance improvements; support for eager NFS writes; support for a Thermal Power Management to control the surface temperature of embedded devices in an unified way; the NAPI polling can be moved to a kernel thread; and support for non-blocking path lookups. As always, there are many other features, new drivers, improvements and fixes.

Also see the LWN release

1. Prominent features

1.1. ID mapping in mounts

This release adds a new system call, mount_setattr(2), which allows to map the permission IDs of one mount to a completely different one. Simply put, different mounts can expose the same file or directory with different ownership. This solves a wide range of use cases that weren't possible before:

Recommended LWN article: ID mapping for mounted filesystems

1.2. Allow selecting preempting model at boot and run time

Linux supports different preemption models. Currently, using one preempt model (none/voluntary/model) is a build-time configuration option. This release adds the preempt=none/voluntary/full boot options (default: full), to allow distributions to build a PREEMPT kernel but fall back to close to PREEMPT_VOLUNTARY (or PREEMPT_NONE) runtime scheduling behavior via a boot-time selection. There's also the /debug/sched_debug switch to do this runtime. This feature is implemented via runtime patching (a new variant of static calls).

1.3. KFENCE memory error detector

Kernel Electric-Fence (KFENCE) is a new low-overhead sampling-based memory safety error detector. It detects heap out-of-bounds access, use-after-free, and invalid-free errors.

Linux already has a memory error detector, KASAN. KFENCE is not as thorough as KASAN, but unlike KASAN it has near zero performance overhead - it trades performance for precision. Because of the low overhead, it is designed to be enabled and used in production kernels.

Documentation: Kernel Electric-Fence (KFENCE)

1.4. Support for the ACRN hypervisor

This release adds support for the ACRN hypervisor. ACRN is a Type 1 reference hypervisor stack, running directly on the bare-metal hardware, and is suitable for a variety of IoT and embedded device solutions. It implements a hybrid VMM architecture, using a privileged Service VM. The Service VM manages the system resources (CPU, memory, etc.) and I/O devices of User VMs. Multiple User VMs are supported, with each of them running Linux, Android OS or Windows. Both Service VM and User VMs are guest VM.

Documentation: ACRN documentation

1.5. Btrfs initial support for zoned devices and subpage block size

This release adds initial support for Btrfs in zoned devices, which are storage devices divided in zones that can only be written sequentially.

This release also adds support for block sizes smaller than the size of a memory page, which is a requirement sharing file systems between machines with different page sizes.

There are also several many performance improvements.

Recommended LWN article: Btrfs on zoned block devices

1.6. Eager NFS writes

This release adds support for eager writes: When enabled, writes will be sent immediately to the server, instead of letting the kernel send asynchronously in the background. This can help in some cases, like for example ensuring that a NFS client sees ENOSPC errors immediately.

A set of mount options for NFS file systems is added to control how write() system calls react. writes=lazy is the default, and keeps the current behaviour. writes=eager means we send off the write immediately as an unstable write to the server. writes=wait means we send off the write as an unstable write, and then wait for the reply.

1.7. Non-blocking path lookup while opening a file

This release supports path name lookups that will not block under any circumstance. This means that the kernel will try to resolve the path with the cached data, but if it needs to do I/O, it will return an error. This is needed for io_uring(), but support in openat2() with the RESOLVE_CACHED flag has been added, too.

Recommended LWN article: Avoiding blocking file-name lookups

1.8. Kernel thread-based NAPI polling

NAPI is a networking feature that polls the network device instead of waiting for IRQs, because it benefits performance in high-throughput loads. That polling, however, runs in softirq context, where the task scheduler can't see it, and it makes hard to tune the system for maximum performance.

In this release, the polling can be configured to be done by a kernel thread. These kernel threads are managed by the task scheduler, which can make better scheduling decisions, and because they are visible by userspace administrators can pin a kernel threads to specific CPUs.

Recommended LWN article: NAPI polling in kernel threads

1.9. Dynamic Thermal Power Management

The density of components greatly increased the last decade bringing a numerous number of heating sources which are monitored by more than 20 sensors on recent SoC. The skin temperature, which is the case temperature of the device, must stay below approximately 45°C in order to comply with the legal requirements.

The skin temperature is managed as a whole by an user space daemon, which is catching the current application profile, to allocate a power budget to the different components where the resulting heating effect will comply with the skin temperature constraint. This technique is called the Dynamic Thermal Power Management.

This series provides a Dynamic Thermal Power Management framework to provide an unified way to act on the power of the devices.

Documentation: Dynamic Thermal Power Management framework

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. x86

11.2. ARM

11.3. RISC-V

11.4. POWERPC

11.5. MIPS

11.6. CSKY

11.7. S390

11.8. PA-RISC

11.9. C6X

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. Serial

12.13. CPU Frequency scaling

12.14. Device Voltage and Frequency Scaling

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

12.16. Real Time Clock (RTC)

12.17. Pin Controllers (pinctrl)

12.18. Multi Media Card (MMC)

12.19. Memory Technology Devices (MTD)

12.20. Industrial I/O (iio)

12.21. Multi Function Devices (MFD)

12.22. Pulse-Width Modulation (PWM)

12.23. Inter-Integrated Circuit (I2C + I3C)

12.24. Hardware monitoring (hwmon)

12.25. General Purpose I/O (gpio)

12.26. Leds

12.27. DMA engines

12.28. Cryptography hardware acceleration

12.29. PCI

12.30. Non-Transparent Bridge (NTB)

12.31. Thunderbolt

12.32. Clock

12.33. PHY ("physical layer" framework)

12.34. CXL (Compute Express Link)

12.35. Various

13. List of Pull Requests

14. Other news sites

KernelNewbies: Linux_5.12 (last edited 2021-05-01 23:27:50 by diegocalleja)