返回资讯中心
外部精选
软件工程
#社区热议

Development statistics for the 7.2 kernel

Out of curiosity, I checked what results this would give in the existing kernel code.

Hacker Newsfarlight2026/10/17 · 10 天前18 分钟阅读

以下正文同步自 Hacker News,版权归原站所有,已转换为易读排版。

Time to reconsider "lines changed"?

Posted Aug 17, 2026 20:46 UTC (Mon) by corbet (editor, #1) [Link] (11 responses)

Out of curiosity, I checked what results this would give in the existing kernel code.

Here's an analysis of the entire (excluding pre-git) linux.git history.

First, I created a shortlog (at the moment my copy seems to be checking out, which is 0e35b9b6ec0f (2026-07-06; "Merge tag 'mm-hotfixes-stable-2026-07-06-17-49' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm")):

$ time git shortlog -s | sort > linux.shortlog;

real 0m10.316s user 0m9.829s sys 0m0.488s

Then I edited manually to keep only those with 5k commits or more, which gives us 28 authors.

$ cat linux+5000.shortlog; 5122 Russell King 5217 Kent Overstreet 5261 Alex Deucher 5542 Dave Airlie 5648 Kuninori Morimoto 5742 Dan Carpenter 5866 Uwe Kleine-König 5942 H Hartley Sweeten 6010 Eric Dumazet 6067 Rafael J. Wysocki 6219 Ville Syrjälä 6394 Andy Shevchenko 6448 Ingo Molnar 6473 Chris Wilson 6931 Johannes Berg 7018 Geert Uytterhoeven 7475 Thomas Gleixner 7734 Greg Kroah-Hartman 7928 Jakub Kicinski 8237 Al Viro 8272 Krzysztof Kozlowski 8784 Mauro Carvalho Chehab 10100 Takashi Iwai 10623 Christoph Hellwig 11107 Mark Brown 12572 Arnd Bergmann 15662 David S. Miller 46174 Linus Torvalds

Then I created another file with the LoC additions, deletions, and net total for each of those authors, using the script from https://stackoverflow.com/a/7010890/6872717 with some minor changes.

$ time cat linux+5000.shortlog
| cut -f2
| while read author; do git log --author="$author" --pretty=tformat: --numstat
| gawk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "+%s, -%s; = %s\n", add, subs, loc }' - \

linux+5000.stat; done;

real 6m52.151s user 6m29.544s sys 0m13.579s

Then I manually edited that to get a format I liked more, and then I paste(1)d both files:

$ paste linux+5000.s[ht]* > linux+5000.paste $

After some manual white-space alignment, I also added manually a division between the net total and the number of commits, to see a ratio. It looks like this:

$ cat linux+5000.paste 5122 Russell King +184235, -143104; = 41131; =/ 8.0 5217 Kent Overstreet +300316, -169273; = 131043; =/ 25 5261 Alex Deucher +1408449, -111137; = 1297312; =/ 250 5542 Dave Airlie +154738, -108454; = 46284; =/ 8.4 5648 Kuninori Morimoto +169261, -91488; = 77773; =/ 13.8 5742 Dan Carpenter +19599, -20130; = -531; =/ -0.09 5866 Uwe Kleine-König +88605, -289043; = -200438; =/ -34 5942 H Hartley Sweeten +125006, -197207; = -72201; =/ -12.2 6010 Eric Dumazet +99587, -78051; = 21536; =/ 3.56 6067 Rafael J. Wysocki +112202, -75543; = 36659; =/ 6.0 6219 Ville Syrjälä +158922, -110333; = 48589; =/ 7.8 6394 Andy Shevchenko +82318, -130279; = -47961; =/ -7.5 6448 Ingo Molnar +140653, -126211; = 14442; =/ 2.2 6473 Chris Wilson +233877, -156775; = 77102; =/ 11.9 6931 Johannes Berg +322363, -252874; = 69489; =/ 10.0 7018 Geert Uytterhoeven +152144, -115110; = 37034; =/ 5.3 7475 Thomas Gleixner +197993, -300618; = -102625; =/ 13.7 7734 Greg Kroah-Hartman +927545, -1853403; = -925858; =/ -119 7928 Jakub Kicinski +184705, -304807; = -120102; =/ -15.1 8237 Al Viro +147032, -197345; = -50313; =/ -6.1 8272 Krzysztof Kozlowski +153725, -126351; = 27374; =/ 3.3 8784 Mauro Carvalho Chehab +917701, -700541; = 217160; =/ 25 10100 Takashi Iwai +292386, -329646; = -37260; =/ -3.7 10623 Christoph Hellwig +320440, -603796; = -283356; =/ -27 11107 Mark Brown +302309, -134252; = 168057; =/ 15.1 12572 Arnd Bergmann +112446, -962395; = -849949; =/ -68 15662 David S. Miller +188420, -163354; = 25066; =/ 1.6 46174 Linus Torvalds +6805644, -225103; = 6580541; =/ 143

From this list, I suspect (without knowing the work of most of them) I'd like Dan Carpenter's work most. At +4/-4 LoC per patch and a net total of -0.09, those patches must be quite readable and effective. And indeed, peeking at his commits they seem to be enjoyable.

In general, I also expect I'll tend to like the most those with single-digit ratios, and also those with negative ratios (regardless of their absolute value). In some cases, large negative ratios are due to removals of entire files, which masks a little bit the other work of those contributors, but removing entire files is per se a good thing (especially, if the functionality remains).

Having said this, I'm also curious to check myself.

Here are the same statistics for the contributors to shadow-utils that have more than 100 commits:

$ cat shadow+100.paste 125 Tobias Stoeckmann +2489, -1624; = 865; =/ 6.9 315 Iker Pedrosa +15469, -27299; = -11830; =/ -38 480 Serge Hallyn +598130, -180211; = 417919; =/ 870 1063 Alejandro Colomar +22749, -41660; = -18911; =/ -17.8 1666 nekral-guest +829212, -541427; = 287785; =/ 173

My ratio is negative and 2-digit. It's a bit larger than it used to be, due to the recent removal of entire programs and features in 4.20.0, but even before those removals, I had been proud of keeping a negative ratio (except for a few times, my ratio used to be consistently negative and single-digit).

And here are same statistics for the contributors to the Linux man-pages that have more than 100 commits:

$ cat man+100.paste 108 Zeng Linggang +2179, -0; = 2179; =/ 20 116 Marko Myllynen +2311, -1143; = 1168; =/ 10.1 124 David Prévot +429, -414; = 15; =/ 0.121 127 наб +1717, -1115; = 602; =/ 4.7 131 Seth McDonald +452, -152; = 300; =/ 2.3 146 Ma Shimiao +1611, -72; = 1539; =/ 10.5 254 Jakub Wilk +593, -580; = 13; =/ 0.051 492 Peng Haitao +4552, -1031; = 3521; =/ 7.2 4157 Alejandro Colomar +192185, -162816; = 29369; =/ 7.1 18790 Michael Kerrisk +737560, -442728; = 294832; =/ 15.7

I'm proud of maintaining that ratio single-digit even after so many additions.

Here are the same statistics for v7.2, for contributors over 100 commits:

$ cat linux7.2+100.paste 100 Sean Christopherson +1902, -1655; = 247; =/ 2.5 104 Christoph Hellwig +3505, -3112; = 393; =/ 3.8 106 Namjae Jeon +3668, -1362; = 2306; =/ 21 108 Thorsten Blum +624, -693; = -69; =/ -0.64 110 Mark Brown +245, -76; = 169; =/ 1.54 115 Ville Syrjälä +2087, -1608; = 479; =/ 4.2 121 Eric Dumazet +1728, -1236; = 492; =/ 4.1 124 Johannes Berg +6757, -3393; = 3364; =/ 27 125 Krzysztof Kozlowski +1294, -671; = 623; =/ 5.0 130 Chuck Lever +5259, -6194; = -935; =/ -7.2 133 Arnaldo Carvalho de Melo +3426, -721; = 2705; =/ 20 133 Johan Hovold +999, -1628; = -629; =/ -4.7 134 Arnd Bergmann +1009, -6771; = -5762; =/ -43 138 Ian Rogers +31447, -8130; = 23317; =/ 169 144 Uwe Kleine-König (The Capable Hub) +11569, -11070; = 499; =/ 3.5 146 Rosen Penev +862, -1651; = -789; =/ 5.4 313 Jakub Kicinski +2169, -8097; = -5928; =/ -18.9 490 Linus Torvalds +10, -89; = -79; =/ -0.161

I should have excluded merge commits from these statistics. Linus has some weird numbers due to those.

Time to reconsider "lines changed"?

Posted Aug 28, 2026 15:25 UTC (Fri) by corbet (editor, #1) [Link] (2 responses)

Line counts never were useful for anything other than telling the amount of lines..

If you have a better idea of how to describe hardware registers in C code then do tell.

Time to reconsider "lines changed"?

Posted Aug 17, 2026 23:48 UTC (Mon) by rgmoore (✭ supporter ✭, #75) [Link] (6 responses)

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →