|
|
Log in / Subscribe / Register

Six years with the 4.9 kernel

By Jonathan Corbet
January 12, 2023
The release of the 4.9.337 stable kernel update on January 7 marked the end of an era: after just over six years of maintenance, the 4.9.x series will receive no more updates. This kernel saw a lot of change after Linus Torvalds made the "final" release and left the building; it's time for a look at the "stable" portion of this kernel's life to see what can be learned.

The development cycle that led up to the 4.9 release saw the addition of 16,214 non-merge changesets contributed by 1,719 developers (a record at the time) working for (at least) 228 companies. In the six years between 4.9 and 4.9.337, instead, it gained 23,391 non-merge changesets from 4,037 developers working for at least 503 companies. The 4.9.337 release contains 114,000 more lines of code than 4.9 did. Rather than being the end of a kernel's development life, the final release from Torvalds is really just the beginning of a new and longer phase — at least, for long-term-support kernels.

Contributors

The top contributors of fixes to 4.9.x were:

Top bug-fix contributors to 4.9.x
DeveloperChangesetsPct
Greg Kroah-Hartman 4702.0%
Eric Dumazet 3951.7%
Johan Hovold 3561.5%
Dan Carpenter 3261.4%
Takashi Iwai 2951.3%
Arnd Bergmann 2861.2%
Thomas Gleixner 1960.8%
Jason A. Donenfeld 1710.7%
Eric Biggers 1590.7%
Colin Ian King 1380.6%
Christophe JAILLET 1340.6%
Nathan Chancellor 1250.5%
Hans de Goede 1200.5%
Geert Uytterhoeven 1170.5%
Xin Long 1130.5%
Yang Yingliang 1080.5%
Jan Kara 1020.4%
Randy Dunlap 1010.4%
Linus Torvalds920.4%
Johannes Berg 920.4%
Peter Zijlstra 910.4%
Al Viro 900.4%
Florian Fainelli 890.4%
Theodore Ts'o 880.4%

While Greg Kroah-Hartman shows as the top contributor of changesets, it is worth remembering that 337 of them are simply setting the version number for each stable release. His appearance there is thus an artifact of how the stable kernels are produced — not that he doesn't play a major role in this process, of course, as will be seen below.

The most active employers of contributors to 4.9.x were:

Employers supporting 4.9.x fixes
CompanyChangesetsPct
(Unknown)21779.3%
(None)21499.2%
Google19408.3%
Red Hat19118.2%
Intel15536.6%
SUSE11815.0%
Huawei Technologies10504.5%
IBM8343.6%
(Consultant)7673.3%
Linux Foundation6973.0%
Linaro6252.7%
Arm4341.9%
Oracle3871.7%
Mellanox3141.3%
Samsung2861.2%
Broadcom2601.1%
Linutronix2341.0%
Facebook2261.0%
Renesas Electronics2010.9%
NXP Semiconductors1960.8%

It can be interesting to compare these numbers to the statistics for the 4.9 release. There are many of the same names there, but the ordering is different. The biggest contributors of work for a mainline release may not be the biggest contributors of fixes after that release is made.

Backports

The stable rules require that changes appear in the mainline before being added to a stable update, so most (or all) of the patches counted above were written for the mainline. Backporting them to 4.9 is a different level of work on top of that. This task can be as simple as applying a patch unmodified to a different tree, or as complex as rewriting it altogether. Either way, there is clearly a lot of work involved in backporting over 23,000 patches to a different kernel.

One way to try to separate out that work was suggested by Srivatsa S. Bhat. A developer who backports a patch to an older kernel is essentially resubmitting it, and so must add a Signed-off-by tag to the patch changelog. Each patch in the stable kernel also contains the commit ID of the original in the mainline. Using that information, one can look at each stable patch and identify any Signed-off-by tags that were added since that patch was merged into the mainline. Those additional signoffs should indicate who backported each one.

In the 4.9.x series, 21,495 of the commits have added Signed-off-by tags. The remaining ones will include the above-mentioned version-number changes, patches that should have gotten an additional tag but didn't, and (most probably) patches that were backported by their original author. The result is thus a picture that is not perfect, but which is clear enough:

Top 4.9.x backporters
DeveloperChangesetsPct
Greg Kroah-Hartman1513570.41%
Sasha Levin920842.84%
Ben Hutchings3101.44%
David Woodhouse1420.66%
Amit Pundir900.42%
Sudip Mukherjee830.39%
Jason A. Donenfeld730.34%
Mark Rutland710.33%
Lee Jones520.24%
Nathan Chancellor440.20%
Florian Fainelli420.20%
David A. Long400.19%
Nick Desaulniers360.17%
Alex Shi270.13%
Thomas Gleixner240.11%
James Morse240.11%
Giuliano Procida240.11%
Nobuhiro Iwamatsu230.11%
Thadeu Lima de Souza Cascardo220.10%
Arnd Bergmann150.07%

The bulk of the backporting work is clearly being done by the two stable-kernel maintainers: Kroah-Hartman and Sasha Levin. In some cases, they have both added signoffs to the same patch, causing the percentages to add up to more than 100%. The work done by everybody else pales by comparison — especially if one only looks at the patch counts. Often, though, the reason for a developer other than the stable-kernel maintainers to backport a patch is that the backport is not trivial. So, while the other developers backported far fewer patches, many of those patches almost certainly required a lot more work.

Bug reports

In theory, almost every patch in the stable series is a bug fix, implying that somebody must have found and reported a bug. As it happens, only 4,236 of the commits in the 4.9.x series include a Reported-by tag — only 18% of the total. So most of the problems being fixed are either coming to light in some other way, or the report tags are not being included. For the patches that did include such tags, the results look like:

Top bug reporters in 4.9.x
ReporterReportsPct
Syzbot90118.8%
Hulk Robot 1813.8%
kernel test robot 1563.2%
Dmitry Vyukov 1002.1%
Andrey Konovalov 801.7%
Dan Carpenter 791.6%
Jann Horn 340.7%
Guenter Roeck 290.6%
Jianlin Shi 270.6%
Ben Hutchings 260.5%
Fengguang Wu 260.5%
Al Viro 210.4%
Arnd Bergmann 190.4%
Lars-Peter Clausen 190.4%
Xu, Wen 190.4%
Eric Biggers 180.4%
Igor Zhbanov 180.4%
TOTE Robot 180.4%
Tetsuo Handa 170.4%
Linus Torvalds160.3%

Bug reporting is clearly widely distributed, with the top three reporters (all robots) accounting for just over 25% of the total. Even so, it is clear that the bug-hunting robots are finding a lot of problems, hopefully before our users do.

Bug introduction

Another thing one can look at is the source of the bugs that were fixed in 4.9.x. Some work mapping Fixes tags in 4.9.x commits to the original commits can shine a light on when bugs were introduced; the result is a plot that looks like this:

[4.9.x fixes]

The 4.9 and 4.8 releases are, unsurprisingly, the source of many of the bugs fixed in the stable updates, with nearly 700 coming from each. After that comes the usual long tail, including every release ever made since the Git era began at 2.6.12. Every pre-4.10 release in the Git history is represented here; the least-fixed release is 2.6.17, which was released in 2006, with "only" 22 fixes.

That plot is not the whole story, though. Each of the 4.9.28, 4.9.34, 4.9.51, 4.9.75, 4.9.77, 4.9.78, 4.9.79, 4.9.94, 4.9.102, 4.9.187, 4.9.194, 4.9.195, 4.9.198, 4.9.207, 4.9.214, 4.9.219, 4.9.228, 4.9.253, 4.9.258, 4.9.259, 4.9.261, 4.9.265, 4.9.298, and 4.9.299 releases included a commit that was identified by a later Fixes tag; 4.9.81 and 4.9.218 had two, and 4.9.310 had three. Each of those, clearly, indicates a regression that was introduced into the stable kernel and later fixed. But even that is not the full picture; consider this:

[post-4.9.x fixes]

Every release made after 4.9 also introduced bugs that had to be fixed in the stable updates — over 1,500 fixes in all. That is a lot of buggy commits to have introduced into a "stable" kernel. One should also not take the wrong message from the lower counts for more recent kernel releases. It might be possible that our releases are getting less buggy, but a more plausible explanation is that the empty space in the upper-right half of that plot just represents bugs that have not yet been found and fixed.

The 4.9 stable series was, thus, not perfect — not that anybody ever claimed that it was. It was, however, good enough to be the core of many deployed systems, including an unimaginable number of Android devices. The 4.9 kernel series is a testament to what the development community can accomplish when it sets its mind to it. It was a base that many users could rely on, and has well earned its retirement.

Index entries for this article
KernelReleases/4.9


The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:

Note: you can avoid this step in the future by logging into your LWN account.


Copyright © 2023, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds