LWN: Comments on "How old is our kernel?" https://lwn.net/Articles/374574/ This is a special feed containing comments posted to the individual LWN article titled "How old is our kernel?". en-us Mon, 29 Sep 2025 00:01:45 +0000 Mon, 29 Sep 2025 00:01:45 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net How were the moved/renamed files accounted for ? https://lwn.net/Articles/376730/ https://lwn.net/Articles/376730/ nye <div class="FormattedComment"> So -M (detect renames) seems from a user's point of view to act differently depending on whether you're trying to log a file or the whole project.<br> <p> This seems like a good, specific example of one of those usability issues people are always handwaving about.<br> </div> Tue, 02 Mar 2010 12:47:28 +0000 How were the moved/renamed files accounted for ? https://lwn.net/Articles/376673/ https://lwn.net/Articles/376673/ jnareb <blockquote><i>In my experience, 'git log -M' did never give the full log of a single file. I have now discovered that 'git log --follow' does.</i></blockquote> Actually the problem is that in "git log -M <i>filename</i>" the <i>filename</i> part is path limiter, and is applied (for history simplification) before rename detection, and that is why you need "git log --follow <i>filename</i>". "git log -M" (no pathspec), or "git log -M <i>directory</i>" should work as expected. Tue, 02 Mar 2010 01:13:59 +0000 Loose objects, packfile, deltification and the cost of disk space https://lwn.net/Articles/376671/ https://lwn.net/Articles/376671/ jnareb <blockquote><i> There was no deltification at all iirc Argument from Linus back in git early days was that disk space is cheap. Others come up with the whole xdelta pack thing later. </i></blockquote> Actually packfiles and deltification (LibXDiff, not xdelta) was, from what I remember and understand, originally because of <b>network bandwidth</b> (which is much more costly than disk space), and <b>I/O performance</b> of using single mmapped file instead of very large number of loose objects. Tue, 02 Mar 2010 01:10:15 +0000 How were the moved/renamed files accounted for ? https://lwn.net/Articles/376532/ https://lwn.net/Articles/376532/ phdm <div class="FormattedComment"> In my experience, 'git log -M' did never give the full log of a single file.<br> I have now discovered that 'git log --follow' does.<br> </div> Mon, 01 Mar 2010 03:42:29 +0000 How were the moved/renamed files accounted for ? https://lwn.net/Articles/376341/ https://lwn.net/Articles/376341/ dlang <div class="FormattedComment"> I believe that there is a -M flag that tells these tools to follows moves and renames (and IIRC you can give it an argument to tell it how hard to look for moves and renames)<br> <p> this can also track when parts of a file are copied to another file.<br> </div> Fri, 26 Feb 2010 18:31:15 +0000 How were the moved/renamed files accounted for ? https://lwn.net/Articles/376322/ https://lwn.net/Articles/376322/ phdm <div class="FormattedComment"> I didn't know that 'git blame' did such a good job. Does 'git log' also do such a nice job now (following moves and renames) ?<br> </div> Fri, 26 Feb 2010 16:33:26 +0000 Older trees https://lwn.net/Articles/376316/ https://lwn.net/Articles/376316/ eli <div class="FormattedComment"> Thank you, sir!<br> <p> 'Course, now I need to stare at it for an hour looking for all the interesting things it's trying to tell me. ;)<br> </div> Fri, 26 Feb 2010 14:44:45 +0000 How were the moved/renamed files accounted for ? https://lwn.net/Articles/376307/ https://lwn.net/Articles/376307/ corbet Git tracks renames nicely and retains the history for the moved files. So no, a rename does not, alone, cause any lines in the file to be considered to be changed. Fri, 26 Feb 2010 14:28:20 +0000 Blank lines https://lwn.net/Articles/376290/ https://lwn.net/Articles/376290/ efexis <div class="FormattedComment"> Unless the blank lines were proportionally evenly distributed, in which case the effect would simply be cancelled out, but even so... a character changed in a long line of code counts the same as the whole line changing, but it's enough to give a feel for what's going on, as long as it's understood that these types of stats serve to guide towards reality rather than define it.<br> <p> <p> </div> Fri, 26 Feb 2010 08:51:16 +0000 How were the moved/renamed files accounted for ? https://lwn.net/Articles/376291/ https://lwn.net/Articles/376291/ phdm <div class="FormattedComment"> Just a question : did you count moved or renamed files as changed or unchanged lines ?<br> </div> Fri, 26 Feb 2010 08:46:50 +0000 Older trees https://lwn.net/Articles/376256/ https://lwn.net/Articles/376256/ robert_s <div class="FormattedComment"> With this graph, sir, you have read my mind.<br> </div> Fri, 26 Feb 2010 00:26:32 +0000 How old is our kernel? https://lwn.net/Articles/376236/ https://lwn.net/Articles/376236/ ariveira <div class="FormattedComment"> There was no deltification at all iirc<br> <p> Argument from Linus back in git early days was that disk space<br> is cheap.<br> <p> Others come up with the whole xdelta pack thing later.<br> </div> Thu, 25 Feb 2010 22:15:16 +0000 Any chance of increasing the resolution? https://lwn.net/Articles/376207/ https://lwn.net/Articles/376207/ KGranade <div class="FormattedComment"> How difficult would it be to increase the resolution to -rc releases? I think it would be very interesting to see what kind of pattern there is for them, if any. I would assume that late rcs, while smaller would have better longevity percentage-wise than early rcs.<br> </div> Thu, 25 Feb 2010 19:46:54 +0000 Changing Licence https://lwn.net/Articles/376054/ https://lwn.net/Articles/376054/ Felix_the_Mac <div class="FormattedComment"> Back when GPL3 was being worked on, and it was a (slightly) open question whether the kernel would adopt it, it seemed to me that this type of historical analysis of code history was exactly what was required.<br> <p> With the ownership of each line of code traced to its author, and an agreed definition of what constitutes original work (rather than just a minor change to somebody else's work) it would be possible to determine who held rights in each file.<br> <p> If, for example, the GPL2 became unenforceable in China or India, and it was decided that a license change to GPL2++ was required, then permission could be sought from identified license holders and the code belonging to those who were unavailable or unwilling to give assent could be rewritten.<br> </div> Thu, 25 Feb 2010 00:54:28 +0000 Older trees https://lwn.net/Articles/375727/ https://lwn.net/Articles/375727/ Aissen <div class="FormattedComment"> Is your tree online? How does this compare to <a href="http://lwn.net/Articles/285366/">http://lwn.net/Articles/285366/</a> ? <br> I contacted the original author about 3 months ago and built a tree using his ocaml program. It seems to gather data from dave, tglx and linus' tree. <br> <p> If anyone is interested, I can forward the ~210k archive of the program building the tree.<br> </div> Tue, 23 Feb 2010 00:34:24 +0000 Older trees https://lwn.net/Articles/375560/ https://lwn.net/Articles/375560/ nix <div class="FormattedComment"> Oh, that's a lovely graph.<br> <p> I wonder if the inflection point can be attributed to the staging tree? <br> (That's certainly a lot of new crap^Wcode to be deleted...)<br> <p> </div> Mon, 22 Feb 2010 17:40:26 +0000 Older trees https://lwn.net/Articles/375550/ https://lwn.net/Articles/375550/ aegl <div class="FormattedComment"> Here's the "strata" picture you asked for:<br> <p> <a href="http://www.kernel.org/pub/linux/kernel/people/aegl/codestrata.jpg">http://www.kernel.org/pub/linux/kernel/people/aegl/codest...</a><br> <p> The lowest line is the 2.6.12-rc2 git origin. Count up from there<br> to 2.6.32 at the top. Scripts were run with current tip of "linus"<br> tree at v2.6.33-rc8-113-gf8b55f2 so it doesn't take into account the<br> 320 lines of code added and 149 deleted over the weekend.<br> <p> Visually there does seem to be an inflection point around 2.6.27<br> where we slowed down at deleting old code (perhaps because there<br> was so much new code to be deleted instead?)<br> </div> Mon, 22 Feb 2010 17:04:25 +0000 Older trees https://lwn.net/Articles/375301/ https://lwn.net/Articles/375301/ aegl <div class="FormattedComment"> The current git history looks too short to tell whether the speed of code <br> removal follows a "half-life" curve. We still have 58.6% of the git origin <br> (2.6.12-rc2) code present in the current kernel (it only makes up 30.5% of <br> the current code because the kernel is almost twice as large now).<br> <p> Here's a graph showing growth of the kernel, and decline of the original <br> code:<br> <p> <a href="http://www.kernel.org/pub/linux/kernel/people/aegl/codedecay.png">http://www.kernel.org/pub/linux/kernel/people/aegl/codede...</a><br> </div> Fri, 19 Feb 2010 22:32:19 +0000 How old is our kernel? https://lwn.net/Articles/375226/ https://lwn.net/Articles/375226/ hmh <div class="FormattedComment"> <a href="http://lkml.org/lkml/2010/1/21/426">http://lkml.org/lkml/2010/1/21/426</a><br> <p> drivers/block/floppy.c<br> 1 files changed, 618 insertions(+), 601 deletions(-)<br> </div> Fri, 19 Feb 2010 12:11:36 +0000 Blank lines https://lwn.net/Articles/375217/ https://lwn.net/Articles/375217/ hummassa <div class="FormattedComment"> From the POV of the development process, yes, you are right.<br> But if you are measuring the age of the code, I would weed out anything that <br> ends up generating the same object code. Just my opinion there.<br> </div> Fri, 19 Feb 2010 10:33:13 +0000 How old is our kernel? https://lwn.net/Articles/375193/ https://lwn.net/Articles/375193/ aegl <div class="FormattedComment"> There have only been about 169000 non-merge commits since git time began (the 180,000 figure quoted in the article includes all the merges).<br> <p> All of the code in the current tree is attributed to just 131,681 commits by "git blame". So, not counting the merges, it would appear that about 23% of all commits are ultimately completely superceeded (or just plain reverted).<br> </div> Fri, 19 Feb 2010 05:03:48 +0000 Size https://lwn.net/Articles/375175/ https://lwn.net/Articles/375175/ corbet The early git repositories - one file per object - were truly huge. There was a lot of griping at the time. Obviously, things have gotten a lot better since. Fri, 19 Feb 2010 00:49:23 +0000 How old is our kernel? https://lwn.net/Articles/375170/ https://lwn.net/Articles/375170/ jengelh <div class="FormattedComment"> Interestingly, the full history currently takes one CD (my repo is 652M), much less than Linus's projected 3.2GB (perhaps that was a worse deltification back then?).<br> </div> Fri, 19 Feb 2010 00:34:27 +0000 How old is our kernel? https://lwn.net/Articles/375050/ https://lwn.net/Articles/375050/ mezcalero <div class="FormattedComment"> Listing sound/ here is not entirely fair. The fact that sound/ is in the kernel top directory makes it show up in the stats here, although drivers/sound/ would be a much more appropriate place for it.<br> <p> It would be really interesting to see the directories beneath drivers/ showing up in these stats at the same level as sound/.<br> </div> Thu, 18 Feb 2010 15:28:57 +0000 Blank lines https://lwn.net/Articles/375022/ https://lwn.net/Articles/375022/ nix <div class="FormattedComment"> I'd call comment and string changes significant. The only reason I singled out blank lines is because they really *cannot* change in a meaningful manner.<br> <p> </div> Thu, 18 Feb 2010 14:11:24 +0000 How old is our kernel? https://lwn.net/Articles/374983/ https://lwn.net/Articles/374983/ error27 <div class="FormattedComment"> It would be interesting to see how much of the original SCO kernel is still included.<br> <p> He he.<br> </div> Thu, 18 Feb 2010 11:22:20 +0000 Blank lines https://lwn.net/Articles/374962/ https://lwn.net/Articles/374962/ hummassa <div class="FormattedComment"> This seems to me a speculative, rather than a factual, answer.<br> I'd suggest cleaning all and anyy comments, blank lines and strings from the <br> measurements, and comparing. Does not seem too difficult to do.<br> </div> Thu, 18 Feb 2010 10:16:10 +0000 How old is our kernel? https://lwn.net/Articles/374939/ https://lwn.net/Articles/374939/ awils1 <div class="FormattedComment"> David, I'd definitely be interested!<br> <p> (Heh, and here I was thinking I was the only crazy-reformatter -- it may have not been t-philes, but I'm guilty of reformatting some of the GNU documentation.)<br> </div> Thu, 18 Feb 2010 08:40:02 +0000 How old is our kernel? https://lwn.net/Articles/374934/ https://lwn.net/Articles/374934/ nix <div class="FormattedComment"> Yeah! An excuse to refactor floppy.c!<br> <p> (there are some things not even kudos can do)<br> <p> </div> Thu, 18 Feb 2010 07:57:44 +0000 WoPDaSD 2010 https://lwn.net/Articles/374931/ https://lwn.net/Articles/374931/ PO8 <div class="FormattedComment"> The acronym is kind of awkward, but the workshop is pretty cool. It works that way sometimes. :-)<br> </div> Thu, 18 Feb 2010 07:48:26 +0000 How old is our kernel? https://lwn.net/Articles/374914/ https://lwn.net/Articles/374914/ neilbrown <div class="FormattedComment"> Now that these numbers have been published, we risk the XKCD effect - developers will check which of "their" files appear to still be "old" and find an excuse to change them, just to make "their" subsystem seem more current, cool, hip, and up-to-date.<br> Further proof that you cannot observe a system without changing it....<br> <p> </div> Thu, 18 Feb 2010 02:23:35 +0000 WoPDaSD 2010 https://lwn.net/Articles/374907/ https://lwn.net/Articles/374907/ felixfix <div class="FormattedComment"> It's related to INTERCAL ...<br> <p> "The full name of the compiler is "Compiler Language With No Pronounceable Acronym", which is, for obvious reasons, abbreviated "INTERCAL"."<br> </div> Thu, 18 Feb 2010 00:02:11 +0000 Blank lines https://lwn.net/Articles/374885/ https://lwn.net/Articles/374885/ xoddam <div class="FormattedComment"> The measurement is entirely relative -- LOCs ain't LOCs, except in the special case where the code is written in the same language, in the same style, even in the same codebase.<br> <p> If it is a valid, apples-to-apples comparison to compare the line count without blank lines (debatable, but I think it is in this case : it's all Linux kernel code after all), I reckon it's equally valid to compare it with them.<br> </div> Wed, 17 Feb 2010 23:04:37 +0000 Older trees https://lwn.net/Articles/374881/ https://lwn.net/Articles/374881/ viro <div class="FormattedComment"> FWIW, I've got a slightly more complete tree (several versions missed by davej added to his) plus the CVS-exported 2.4 BK tree; need to convert the latter to git, then we'll get full tree with all branches (right now there's stuff up to 2.4.0 + 2.4.0--2.6.12 + 2.4.31--2.4.current + 2.6.12--2.6-current, with gap between 2.4.15 and 2.4.31).<br> </div> Wed, 17 Feb 2010 22:38:24 +0000 Older trees https://lwn.net/Articles/374880/ https://lwn.net/Articles/374880/ corbet That's davej's repository, yes. I have it. The tools will require some tweaks to work well with that data source, but it's all certainly doable. Wed, 17 Feb 2010 22:31:25 +0000 Older trees https://lwn.net/Articles/374877/ https://lwn.net/Articles/374877/ dlang <div class="FormattedComment"> there is a historical git archive that can be grafted onto the current 2.6.12 archive.<br> <p> once this is done the combined archive can be treated as a single archive and I expect that the scripts used for this report could be used as-is (although it will obviously take longer)<br> <p> IIRC, the historical git archive goes all the way back to the 0.0x days (although not without gaps)<br> <p> David Lang<br> </div> Wed, 17 Feb 2010 22:24:15 +0000 No worries! https://lwn.net/Articles/374874/ https://lwn.net/Articles/374874/ jzbiciak <div class="FormattedComment"> No worries! The new number makes much more sense. Since I've seen elsewhere that drivers seem to make up a pretty big portion of the tree, it makes sense that the center of gravity for change-rate would land near there too.<br> <p> I guess I wasn't too far off (in orders of magnitude) on the number of unaccounted-for lines in the data, although I did undercall it by a factor of 4. <br> <p> Man, the kernel's gotten huge! I actually tried to download the latest kernel and untar it in a 300MB partition, and it b0rked out, filling the disk only part-way into the "drivers/" directory. Next time I'll do it on a machine with a more generous disk space allotment. :-)<br> </div> Wed, 17 Feb 2010 22:10:13 +0000 Yep, I blew it https://lwn.net/Articles/374864/ https://lwn.net/Articles/374864/ jcm <div class="FormattedComment"> Nah, you obviously didn't blow anything - awesomely informative stats, thanks Jon :)<br> </div> Wed, 17 Feb 2010 21:30:54 +0000 WoPDaSD 2010 https://lwn.net/Articles/374861/ https://lwn.net/Articles/374861/ ajross <div class="FormattedComment"> Were all the pronouncable acronyms already taken?<br> </div> Wed, 17 Feb 2010 20:50:58 +0000 Yep, I blew it https://lwn.net/Articles/374848/ https://lwn.net/Articles/374848/ corbet The 41% number was wrong; the article has been edited with the correct data. <p> For the curious: the bug was a combination of the tool descending into the .git directory (which has no history of its own) and it attributing unknown lines to the oldest release. That essentially inflated the number of "old" lines in the full kernel by about 2 million - enough to make a big difference. <p> Please accept my apologies for the screwup. I'd taught the program to avoid .git a while back, but I thought it was an efficiency improvement only; I didn't realize it had messed up the full-kernel numbers. Embarrassing. Wed, 17 Feb 2010 20:18:18 +0000