If you were to ask any knowledgeable Linux enthusiast what the most impactful kernel version was, many would reply with favorites like 2.6 or 4.2 (and they could be right in their own way!). Even though both of those releases were massive (with 2.6 taking several years to complete), there is a new largest kernel release in town…and it’s known as version 5.8.
With a much shorter release cycle for kernel development today compared to years past, it was definitely surprising to hear that the latest version of our favorite open-source operating system was the largest in its history! Even with all the hype, Linux kernel 5.8 isn’t necessarily the most groundbreaking release ever, but it sure adds a lot of nice features, especially if you’re running newer hardware or are looking at upgrading sometime in the near future.
One of the most preeminent features of 5.8 is the work that has been done on behavior during “memory thrashing” encounters. Memory thrashing happens when the resources allotted to virtual memory are overused, which results in a consistent state of paging and page faults. Consequently, applications in the user space area of the OS become unusable (or “frozen”).
In response, the kernel team decided to take a hard look at Linux’s IO model and was able to implement a more aggressive algorithm to force the kernel to scan random memory during a thrashing episode. In addition, the LRU balance and IO cost between the swap device and file system was altered slightly, effectively optimizing the reclaim for the lowest amount of IO cost possible. In English? You should see noticeable results in performance in high memory situations (like all those browser tabs you have open! ;)).
Another major inclusion into kernel 5.8 is that of the Kernel Concurrency Sanitizer (KCSAN). From the official website:
“The Kernel Concurrency Sanitizer (KCSAN) is a dynamic race detector, which relies on compile-time instrumentation, and uses a watchpoint-based sampling approach to detect data races. KCSAN is supported by both GCC and CLANG. With GCC we require version 11 or later, and with Clang also require version 11 or later.“
This is a very interesting and welcome addition to the kernel in my opinion. For those unaware, data races are one of the nastiest memory issues that affect modern software. This occurs in highly-concurrent systems when two different threads attempt to access the same memory locations at the same time and at least one is attempting to write to said location.
Consequently, some very strange, undefined behavior, or even full-blown memory corruption, can occur. Data races have been one of the most pressing issues faced by C programmers working on concurrent systems (like the Linux kernel), so you can never have enough safeguards in place to attempt to circumvent their overall effect.
Though these two additions stand out in kernel 5.8, there are plenty of other goodies packed into the massive release including a new kernel event notification mechanism built on pipes, private procfs instances, the ability to use pidfds to attach namespaces, improved security for the ARM64 architecture, support for Inline Encryption hardware in the kernel’s block layer, support for Multi-Protocol Label Switching to IPv6, and many Btrfs performance and reliability improvements.
In addition, as with all new kernel releases, 5.8 introduces support for a number of newer hardware interfaces including a new AMD energy driver for Zen and Zen2, improved support for AMD Renoir CPUs and ACP drivers, trusted memory zone support for AMDGPU, improvements to the exFAT driver, Thunderbolt ARM support, and new drivers for the Intel Atom camera.
All in all, I’d say that this was definitely a very productive and impressive kernel release, even though most are already looking ahead to version 5.9 (as always ;)). I want to give a huge shout out to all the people working hard to improve the Linux kernel everyday. It’s not easy work and we salute you for everything you do!
There is a ton of additional changes with kernel 5.8, so make sure to check out this great run down for those newer to kernel development here.