The Register Home Page

back to article Linux kernel 6.16 lands without any headline features but 38M lines of code

Over the weekend, the world's most famous Finn pushed out the latest version of the Linux kernel – and warned of upcoming disruption. Linux kernel 6.16 was released after what was apparently a relaxed end of the development cycle. (We suppose this could be interpreted as a subtle dig at certain file system developers, but then …

  1. Red Ted
    Coat

    "world's most famous Finn"

    A few might disagree with that (although I realise this is probably the wrong forum to make this point)!

    They've got four times World Rally Champion Juha Kankkunen; three F1 World Champions: Keke Rosberg, Mika Häkkinen and Kimi Räikkönen; the composer Jean Sibelius; the author Tove Jansson; film maker Ingmar Bergman, to name but a few.

    1. Anonymous Coward
      Anonymous Coward

      Re: "world's most famous Finn"

      ... probably the wrong forum to make this point)!

      Yes, nailed it.

      .

    2. LVPC Bronze badge
      WTF?

      Re: "world's most famous Finn"

      Huckleberry Finn would disagree.

      1. Paul Herber Silver badge

        Re: "world's most famous Finn"

        So would Neil, but this area is getting a bit crowded now ...

      2. Phil O'Sophical Silver badge
        Coat

        Re: "world's most famous Finn"

        As might Finn MacCool?

    3. Steve K

      Re: "world's most famous Finn"

      Hanno Mikkola? (1980's Rally Champion)

    4. Throatwarbler Mangrove Silver badge
      Joke

      Re: "world's most famous Finn"

      Finn the boy from Adventure Time?

    5. Gene Cash Silver badge

      Re: "world's most famous Finn"

      Also, Jarno Saarinen, who was the first bloke to get a knee down in motorcycle Grand Prix and inspired Kenny Roberts among others.

      Sadly, he was killed at Monza in '73, otherwise history might have been very different and Roberts might not be so well known.

    6. may_i Silver badge

      Re: "world's most famous Finn"

      > film maker Ingmar Bergman

      Bergman was Swedish!

      1. Red Ted
        FAIL

        Re: "world's most famous Finn"

        Yes, he was, sorry. Don’t believe everything you read on the internet! I realised a couple of minutes after the edit window closed.

    7. Liam Proven (Written by Reg staff) Silver badge

      Re: "world's most famous Finn"

      I don't personally "do" sports. Any of them, really. I find it all awfully dull. There are a few I'd like to try -- possibly after a full replacement skeleton (or indeed before one) -- but I don't get the appeal of watching someone _else_ have a good time.

      So I haven't heard of half of them. Of the remainder, half are dead or retired (or Swedish) and are therefore sort of disqualified in my book.

      And TBH I don't trust my ability to spell the others. :-D

    8. ro55mo

      Re: "world's most famous Finn"

      Simo Häyhä aka the 'White Death' deserves a mention.

      1. Matthew "The Worst Writer on the Internet" Saroff

        Re: "world's most famous Finn"

        I would call him most badass, not most famous.

        Simo Häyhä makes a honey badger look like a wimp.

    9. A. Coatsworth
      Happy

      Re: "world's most famous Finn"

      >> Tarja Turunen has entered the chat

    10. LA The Younger
      Go

      Re: "world's most famous Finn"

      A nation of sporting talent indeed! I still look back fondly on memories of Teemu Pukki

  2. m4r35n357 Silver badge

    Educational ;)

    Kernel source code breakdown: https://unix.stackexchange.com/a/223753

    If someone can run cloc against 6.16, that would be cool ;)

    1. Liam Proven (Written by Reg staff) Silver badge

      Re: Educational ;)

      The results of `cloc` are in the article. They're even in the headline.

      1. m4r35n357 Silver badge

        Re: Educational ;)

        Huh? I just re-read it twice (make that three times now!), then did a '/' search in Firefox. No cloc output in there!

        The headline "Linux kernel 6.16 lands without any headline features but 38M lines of code" is pretty much the same as that reported in Tom's hardware, zdnet etc. (none of which dug any deeper than the total figure).

        Did you read my SE link?

        1. Liam Proven (Written by Reg staff) Silver badge

          Re: Educational ;)

          My source for the estimates is in the Phoronix link.

          1. m4r35n357 Silver badge

            Re: Educational ;)

            Sounds like a no. Shame, as it contains some information that everyone else is ignoring, I think they like to complain about bloat and feature creep without knowing what they are talking about.

            Phoronix similar to ZDNet, TH etc., IOW fluff.

  3. Anonymous Coward
    Anonymous Coward

    a core can be sent over an AF_SOCKET instead.

    mildly surprised this wasn't already in place.

    1. Dan 55 Silver badge

      Re: a core can be sent over an AF_SOCKET instead.

      Doesn't systemd do this already?

      Maybe the kernel people are starting to worry if systemd is locked in the OS with them or they're locked in the OS with systemd.

  4. Alan Mackenzie
    Boffin

    Phoronix estimates ....???

    > Phoronix estimates that it has 38.4 million lines of code across over 78,000 files.

    Why are they doing this, rather than just counting these lines and files? Surely they have done this, but are somehow lacking confidence in their counting.

    To find the number of files, you just need to know the set of extensions used by these files, and:

    $ find . -name '*.[ch]' -o -name '*.txt' -o ..... | wc -l

    , or (better) on a pristine kernel source tree:

    $ find . -type f | wc -l

    .

    To find the total number of lines:

    $ find . -name '*.[ch]' -o -name '*.txt' -o ..... | xargs wc -l | grep total | gawk '{tot += $1}; END {print tot}'

    , with the same amendment for the pristine source tree.

    When I do the latter on *.c, *.h, and *.txt files in my copy of the 6.12.31 kernel, I get 34,871,763 lines, not a million miles away from the Phoronix estimate.

    1. Anonymous Coward
      Anonymous Coward

      Re: Phoronix estimates ....???

      How the fuck does a kernel, any kernel, get to 35M+ lines of code?

      This is doubly worrying in Linux-land. Poettering now has a target for the number of lines of code to add to systemd.

      BTW, the FreeBSD kernel which pretty much does everything a Linux kernel does (except suck bigly) is ~3M lines of code. OpenBSD's even smaller IIRC. Just sayin'...

      1. m4r35n357 Silver badge

        Re: Phoronix estimates ....???

        Someone please just read that link I posted, you are completely on the wrong track!

      2. James Loughner

        Re: Phoronix estimates ....???

        Supports almost ever known processor. Takes a lot of conditionals LOL

      3. Teal Bee

        Re: Phoronix estimates ....???

        >How [...] does a kernel get to 35M+ lines of code?

        By including support for hardware, and other essential features.

      4. GNU Enjoyer
        Angel

        Re: Phoronix estimates ....???

        >How the fuck does a kernel, any kernel, get to 35M+ lines of code?

        By having a drivers for large amounts of hardware, plus extremely bloated drivers.

        For example the amdgpu driver;

        `cloc drivers/gpu/drm/amd/`;

        -------------------------------------------------------------------------------

        Language files blank comment code

        -------------------------------------------------------------------------------

        C/C++ Header 1597 79857 523298 4410555

        C 886 122470 87621 670478

        Assembly 9 906 1014 3205

        make 63 869 1763 1373

        -------------------------------------------------------------------------------

        SUM: 2555 204102 613696 5,085,611

        -------------------------------------------------------------------------------

        The large size appears to be how there are register dumps for each GPU included.

        Note that amd withholds the source code of much of the driver and provides half or more of it as proprietary binaries (how it is loaded on co-processors in the GPU instead of loaded onto the main processor doesn't magically make it not part of the driver).

        (git.kernel.org now serves malware in the form of JavaScript - to avoid running malware, you'll need to change your useragent to not include "Mozilla" or use; https://addons.mozilla.org/en-US/firefox/addon/nopow/ );

        https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/amdgpu

        https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/LICENSE.amdgpu

        Adding up the size of the current binaries, that works out to be ~81MiB - which is a substantial amount of software without source code.

        The whole repo weighs; ~2.7GiB (of which only a MiB of binaries are free software that complies with Linux's license).

        On the basis that the core elf plus all modules under /lib/modules/ weighs ~1GiB, it appears Linux in fact weighs somewhere in the ballpark of 94.5 million LoC.

        The non-peripheral device driver parts are much smaller;

        `cloc kernel/`;

        -------------------------------------------------------------------------------

        Language files blank comment code

        -------------------------------------------------------------------------------

        C 451 70520 100633 311033

        C/C++ Header 118 3833 6649 18365

        make 24 102 88 564

        Bourne Shell 1 16 27 56

        -------------------------------------------------------------------------------

        SUM: 594 74471 107397 330018

        -------------------------------------------------------------------------------

        `cloc arch/`;

        -------------------------------------------------------------------------------

        Language files blank comment code

        -------------------------------------------------------------------------------

        C 4324 224484 238384 1074853

        C/C++ Header 4889 83790 111141 441335

        Assembly 1260 45784 96458 222149

        make 623 3290 3224 14369

        Perl 12 1786 1256 12120

        Text 4 72 0 2750

        Bourne Shell 40 316 591 1531

        awk 7 163 92 842

        Linker Script 2 23 9 101

        C++ 2 19 47 59

        Umka 1 18 0 45

        Snakemake 1 6 7 14

        sed 1 2 5 5

        -------------------------------------------------------------------------------

        SUM: 11166 359753 451214 1770173

        -------------------------------------------------------------------------------

        >the FreeBSD kernel which pretty much does everything a Linux kernel does (except suck bigly) is ~3M lines of code. OpenBSD's even smaller IIRC

        The nonfreeBSD and "open"BSD kernel's lack drivers for many peripheral devices and don't work properly with GNU and are proprietary software like Linux, thus those in fact suck more than Linux.

        Hurd, which is a more suitable replacement to Linux, as it is actually free software and is designed to work as well with GNU, as GNU Linux-libre and is quite a lot lighter;

        https://cgit.git.savannah.gnu.org/cgit/hurd/hurd.git/

        https://cgit.git.savannah.gnu.org/cgit/hurd/gnumach.git/tree/

        `cloc gnumach/ hurd/`

        --------------------------------------------------------------------------------

        Language files blank comment code

        --------------------------------------------------------------------------------

        C 1294 88077 117432 418852

        C/C++ Header 1310 28595 54164 113079

        Assembly 31 873 2533 5443

        Bourne Shell 20 386 781 4452

        make 84 904 1821 3705

        m4 12 265 181 1693

        awk 3 25 54 203

        Bourne Again Shell 2 29 41 163

        Pascal 1 15 0 103

        Clojure 4 9 0 46

        diff 3 6 18 32

        --------------------------------------------------------------------------------

        SUM: 2764 119184 177025 547771

        --------------------------------------------------------------------------------

        But that is not including the external drivers.

        Regardless, a kernel on its own is useless - you need the rest of the OS.

        GNU indeed dwarfs the LoC of Linux (although more LoC is only as good as the functionality it implements and GNU is indeed full of functionality); https://gnu.org/software

  5. The Central Scrutinizer Silver badge

    39 miilion lines of code and I understand each and every line. Bahahaha.

    1. m4r35n357 Silver badge

      Does anyone here actually have a clue about what the Linux kernel actually is?

      It is a _relatively_ small amount of core code, together with a metric fuckton of device drivers and machine architectures (well over 90% of the line count).

      Can you guess which OS has the most drivers and architecures? Not telling you!

      Read the ****ing link!

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like