back to article ONE MILLION new lines of code hit Linux Kernel

Linus Torvalds has loosed Linux 4.2-rc1 upon a waiting world, and rates it the biggest release candidate ever in terms of the volume of new code it contains. The Linux Lord writes that “if you count the size in pure number of lines changed, this really seems to be the biggest rc we've ever had, with over a million lines added …

  1. Anonymous Coward
    Anonymous Coward

    One MEEELION lines…

    Does this mean we jump to version 5.0 now?

    1. h4rm0ny

      Re: One MEEELION lines…

      No. A major version increase would be based on new functionality / interface changes. Simple improvements to the codebase (or complex ones!) don't merit that.

      1. Tomato42
        Joke

        Re: One MEEELION lines…

        @h4rm0ny:actually not any more. Now the major number will change when Torvalds feels like it.

        Let's just hope he won't aim to catch up to the Firefox/Chromium team

        1. Bronek Kozicki

          Re: One MEEELION lines…

          @Tomato42 admittedly it's a little bit funny, but it's true (so , not joke)

    2. Anonymous Coward
      Anonymous Coward

      Re: One MEEELION lines…

      Great, so this will no doubt introduce a whole new bunch of vulnerabilities in the Linux kernel. Currently we are on 1277 to date according to CVE Details....

  2. Terafirma-NZ

    wait for it...

    Lots of people cheering on how good they must be while hating Microsoft for doing the exact same thing last week....

    1. asdf

      Re: wait for it...

      Changing innards isn't necessarily a bad thing especially if it improves things or adds support for more things (see Win8 boot times). Changing UIs mostly for your own corporate strategy definitely has mixed results (see Win8+ market share).

      1. Bitbeisser
        Thumb Down

        Re: wait for it...

        The "improved" boot times of Windows 8(.1) is actually one of the biggest pieces of carp introduced, leaving you without a sane way of interrupting a failing boot in order to get into safe mode and try to fix whatever an update has botched...

        1. The Original Steve

          Re: wait for it...

          "...leaving you without a sane way of interrupting a failing boot in order to get into safe mode "

          Other than pressing F8 you mean?

          Or letting it fail three times in which case it will jump to recovery itself.

          But yeah, those things - as well as changing the boot order in the BIOS to recovery media (PXE, USB, optical etc.) - aside it's really, really hard to get into safe mode. /s

          1. Wade Burchette

            Re: wait for it...

            @Steve:

            F8 is disabled by default in Windows 8/8.1/10. It is my opinion that the person who thought disabling F8 was a good idea needs to be smacked in the head every day for the rest of his life.

            Also, sometimes the three time fail does not get you into a recovery console. This is especially true if you get a blue screen. The only guaranteed way to get to the recovery console is to hold shift after you click on the shutdown icon. But Windows has to be running for that to work.

        2. James Cane

          Re: wait for it...

          "The "improved" boot times of Windows 8(.1) is actually one of the biggest pieces of carp introduced, leaving you without a sane way of interrupting a failing boot in order to get into safe mode and try to fix whatever an update has botched..."

          Millions of users get a powerful real-world improvement, but a few tech support people have a slightly harder time and you think it's a big piece of "carp"?

          1. Eddy Ito
            Coat

            Re: wait for it...

            Maybe he was fishing for a little help.

          2. Paul 129
            Facepalm

            Re: wait for it...

            Trouble is when you get a failed machine still under warranty with a warranty seal.

            Do you break the seal or not? In the past you didnt have to, you could choose an alternate boot source, and run your repair tools. Now you have to fight with the system to get the UEFI option screen.

            Not a nice situation, when you discover the drive is failing and you lost valuble time in trying to recover their prized memories. (Its the Old Dears that generally loose the most)

        3. Alan Brown Silver badge

          Re: wait for it...

          "leaving you without a sane way of interrupting a failing boot"

          The same applies to systemd, as I found to my horror and irritation.

          Parallelising the startup processes is a huge win but it's bloody hard to recover from if it goes pear-shaped.

          1. Anonymous Coward
            Anonymous Coward

            Re: wait for it...

            >Parallelising the startup processes is a huge win

            Yep it is and amazingly doesn't require one daemon to do everything else besides to accomplish.

      2. RegMidnight

        Re: wait for it...

        Right, change that actually adds value is good. Not all changes are good, and recognizing this is not being "against change".

    2. Mikel

      Re: wait for it...

      The May patch batch was 1GB, compressed. http://www.theregister.co.uk/2015/05/12/enjoying_the_spring_microsoft_has_13_ways_to_fix_that/

      It is doubtful this will come to that.

    3. oldcoder

      Re: wait for it...

      Not quite the same thing. The kernel is not a complete OS. In this case, the kernel is available - but to make the comparison closer, it is released to the distribution packagers that get to do the testing... Once they finish, then the users get to test the completed OS.

      So this is more just releasing the kernel. Not what MS released.

  3. Spaceman Spiff

    So, the question is, how many of those lines were core kernel additions, as compared to new device and other driver code, which are also considered part of the kernel?

    1. John Brown (no body) Silver badge

      So is this driver code hard-baked into the kernel? What if I don't have an AMD GPU? Do I still get to use up RAM for what sounds like a large chunk of driver code? Or is it actually an optional kernel loadable module?

      1. Chemist

        "So is this driver code hard-baked into the kernel? "

        No. It's usually all loadable modules - all of which you may have on your drive for convenience or not

      2. Vic

        So is this driver code hard-baked into the kernel? What if I don't have an AMD GPU? Do I still get to use up RAM for what sounds like a large chunk of driver code? Or is it actually an optional kernel loadable module?

        As with all drivers, that's up to whomever builds the kernel. For most distros, that means it's a loadable module - you only get it if it can do you some good.

        But if you want to bake it into the kernel, that's a build-time option you can choose if you think it makes sense for you. Most people won't.

        Vic.

  4. frank ly

    Yes but

    All those lines of source code don't end up as object code in a final installation unless they're needed to run devices and filesystems on the target, surely? For a typical domestic or 'professional' installation, I'm wondering what percentage of the full source code actually ends up being installed. I'd also assume that people who 'roll their own' can make a very small final installation.

    1. asdf

      Re: Yes but

      >people who 'roll their own' can make a very small final installation.

      OpenWRT comes immediately to mind. I think their kernel on most architectures isn't that much more than a few meg.

      1. Anonymous Coward
        Anonymous Coward

        Re: Yes but

        OpenWRT comes immediately to mind. I think their kernel on most architectures isn't that much more than a few meg.

        Debian on i386 has a kernel that on its own is only about 3MB. The driver modules occupy 81MB, most of those aren't loaded unless required.

        If your storage is a 256MB SD card or flash chip, then I can see why 81MB is a problem. Most users haven't had this problem for about 20 years.

        1. asdf

          Re: Yes but

          > If your storage is a 256MB SD card or flash chip, then I can see why 81MB is a problem

          For microcontroller programming storage is often measured in kb not meg (and not big numbers). Some consumer routers also don't come with 80 meg of flash even today. I looked and without the modules the OpenWRT kernel itself is only about 1 meg. Good enough to boot a router but not much else.

          1. Anonymous Coward
            Anonymous Coward

            Re: Yes but

            Yep, I agree there. I once wrote code for a machine that had 512 BYTES of RAM. (Not kB, bytes)

            Microcontrollers with a few kB of storage are not going to run a Linux kernel. Anything that runs a consumer or server edition of Windows however, will probably not have a problem storing 100MB+ of kernel driver modules.

            1. Flocke Kroes Silver badge

              Re: Yes but

              It is amazing what a dev with more time than sanity can achieve with 64kB: Lunix.

            2. werdsmith Silver badge

              Re: Yes but

              Yep, I agree there. I once wrote code for a machine that had 512 BYTES of RAM. (Not kB, bytes)

              I once drove a car with all-round drum brakes.

              t'was a time when 512 bytes was over-indulgent luxury.

              1. Stephen Booth

                Re: Yes but

                So I remember. However to be fair most of the "OS" was usually in an additional ROM and 8-bit instructions take less space.

              2. Chemist

                Re: Yes but

                "t'was a time when 512 bytes was over-indulgent luxury."

                Certainly I started on 256 bytes programmed via a hex keypad and not on a microcontroller either (SC/MP on Science of Cambridge MK14)

              3. Neill Mitchell

                Re: Yes but

                Single leading shoe?

          2. Anonymous Coward
            Anonymous Coward

            Re: Yes but

            >For microcontroller programming storage is often measured in kb not meg (and not big numbers).

            The sort of microcontrollers that Linux can run on (like the H8300 port that has just been reintroduced) can access megabytes of RAM (and usually have 32bit address spaces) so their storage would be measured in megabytes.

            >Some consumer routers also don't come with 80 meg of flash even today.

            You don't need to have every driver that Linux has.. you probably can't even select most of the drivers on non-x86 arches.

            >I looked and without the modules the OpenWRT kernel itself is only about 1 meg.

            >Good enough to boot a router but not much else.

            Surely the 1MB kernel is enough to boot the router and load smallish modules like iptables etc to make it function as a router... otherwise you need to tell the openwrt guys they have been wasting their time for however many years they've been working on it.

            1. asdf

              Re: Yes but

              >The sort of microcontrollers that Linux can run on (like the H8300 port that has just been reintroduced) can access megabytes of RAM (and usually have 32bit address spaces) so their storage would be measured in megabytes.

              Yes was just reminding original poster that not every computing device is a laptop made in the last four years. But yeah to run the linux kernel you are going to need megs of memory at least.

              >You don't need to have every driver that Linux has.. you probably can't even select most of the drivers on non-x86 arches.

              Again well aware of that but original poster was saying why worry about storage for linux modules at all when many embedded devices do use Linux and yet don't have massive storage.

              >Surely the 1MB kernel is enough to boot the router and load smallish modules like iptables etc to make it function as a router... otherwise you need to tell the openwrt guys they have been wasting their time for however many years they've been working on it.

              I think you can get a fully functional basic router for less than 3 meg with the newest kernel (used to be under 2 on older kernels) but the modules, libs and progs (such as dnsmasq) needed for even a fairly basic router usually are as big as the kernel itself.

    2. Vic

      Re: Yes but

      ll those lines of source code don't end up as object code in a final installation unless they're needed to run devices and filesystems on the target, surely?

      They will most assuredly end up as object code on an installation. They just won't actually be loaded unless the relevant hardware is detected. This is marginally inefficient in terms of disk space use[1], but means that a major change of hardware between boots of the same drive doesn't cause problems.

      For a typical domestic or 'professional' installation, I'm wondering what percentage of the full source code actually ends up being installed.

      If you mean the object code built from that source, then substantially all of it gets installed, so it's available if needed.

      I'd also assume that people who 'roll their own' can make a very small final installation.

      Yes, if that makes sense to them. That's usually only the case when disk space is at a premium.

      Vic.

      [1] For example, the machine I am typing this on uses an Intel processor. That means that the AMD MC support driver (amd64_edac_mod) is wasting nearly 39K of my disk space. I think I can live with that.

  5. keithpeter Silver badge
    Windows

    Lines coming out?

    OK so extra code for GPAs &c going in. Most 'stock' compilations of the kernel will simply leave that code out or provide it as a binary module for dynamic loading as others have said.

    Anyone have an idea about how much code came out? The x86 changes for instance could be replacing older crufty code with newer code thus eliminating some exploits (and perhaps introducing new ones).

    "One of my most productive days was throwing away 1000 lines of code." -- Ken Thompson

    "When the Lisa team was pushing to finalize their software in 1982, project managers started requiring programmers to submit weekly forms reporting on the number of lines of code they had written. Bill Atkinson thought that was silly. For the week in which he had rewritten QuickDraw’s region calculation routines to be six times faster and 2000 lines shorter, he put "-2000" on the form. After a few more weeks the managers stopped asking him to fill out the form, and he gladly complied."

    http://programmers.stackexchange.com/questions/103807/what-is-negative-code

    1. Tomato42
      Linux

      Re: Lines coming out?

      The article does mention that they did throw away quarter of a million of lines...

      Also, it's rather hard to implement new features in negative code, especially significant ones, like support for new class of GPU...

    2. rtfazeberdee

      Re: Lines coming out?

      If you read the article, it says 250k lines where removed

  6. Tom 7

    410,000 lines in the AMD register description header?

    Wow! How many are #ifdef?

    1. Bronek Kozicki

      Re: 410,000 lines in the AMD register description header?

      yeah and these all are headers. My guess it's "magical" consts and structures recognized by AMD GPU which until now lived only in proprietary AMD driver sources.

  7. Bronek Kozicki

    So, I had a look at that single large commit (removed 9,838 ; added 453,818 lines) in 4.2-rc1 and it's interesting one, here, because of the following 2 new drivers:

    • virtio-gpu KMS only pieces of driver for virtio-gpu in qemu. This is just the first part of this driver, enough to run unaccelerated userspace on. As qemu merges more we'll start adding the 3D features for the virgl 3d work.
    • amdgpu a new driver from AMD to driver their newer GPUs. (VI+) It contains a new cleaner userspace API, and is a clean break from radeon moving forward, that AMD are going to concentrate on. It also contains a set of register headers auto generated from AMD internal database.

    This is going to be useful.

  8. Jamie Jones Silver badge

    One million new lines...

    ... but it still can't run windows...

    1. John Sanders
      Holmes

      Re: One million new lines...

      Yes you can using KVM.

      1. Jamie Jones Silver badge
        Happy

        Re: One million new lines...

        Good comeback.. I guess I should have written 'windows programs' !

        As for the four morons that downvoted, I thought it was pretty obvious without knowing my posting history that this was an intentionally stupid tongue-in-cheek post.

        So obvious, that I thought the "JOKE ALERT" icon an insult to readers intelligence.

        It seems that at least four of you don't know sarcasm when it hits you in the face

        1. h4rm0ny

          Re: One million new lines...

          >>"It seems that at least four of you don't know sarcasm when it hits you in the face"

          Actually, I just figured you were trolling.

        2. Anonymous Coward
          Anonymous Coward

          Re: One million new lines...

          > It seems that at least four of you don't know sarcasm when it hits you in the face

          they are probably yanks

          1. Anonymous Coward
            Anonymous Coward

            Re: One million new lines...

            >they are probably yanks

            Or limey ex pats that spent too much time in the states.

    2. Herby

      Re: One million new lines...

      "... but it still can't run windows..."

      Personally I would consider this a "feature". I suspect others would as well.

      Up/Down votes will tell.

  9. Anonymous Coward
    Anonymous Coward

    Rather scary

    I understand that Linus is far above us mortals, but this volume of code seems a little scary to me. Look at the AMD driver files for example, like atombios.h. 8000+ lines of magic numbers. After reviewing the first few hundred lines your eyes go squiggly and it would be easy to mistake a 0x08 for a 0x00. I'm not sure even the many eyeballs/shallow bugs theory would hold here.

    If was a government employee of a certain three letter agency, I would be eyeing this level of change with much interest. We already know that people have tried to slip in one-character exploits to people's source code servers...

    1. Bronek Kozicki

      Re: Rather scary

      These headers have been "auto generated from AMD internal database." (source : commit comment). There is no point reviewing those.

      But I do understand why one might want to do it.

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