David A. Wheeler's Blog

Thu, 14 Jul 2011

Microsoft, co-author of the Linux kernel

Truth is often stranger than fiction. Microsoft was the fifth-largest corporate contributor to the Linux kernel version 3.0.0, as measured by the number of changes to its previous release. Only Red Hat, Intel, Novell, and IBM had more contributions. Microsoft was #15 as measured by number of lines changed, which is smaller but is still an impressively large number.

This work by Microsoft was to clean up the “Microsoft Hyper-V (HV) driver” so that the Microsoft driver would be included in the mainline Linux kernel. Microsoft originally submitted this set of code changes back in July 2009, but there were a lot of problems with it, and the Linux kernel developers insisted that it be fixed. The Linux community had a long list of issues with Microsoft’s code, but the good news is that Microsoft worked to improve the quality of its code so that it could be accepted into the Linux kernel. Other developers helped Microsoft get their code up to par, too. ( Steve Friedl has some comments about its early technical issues.) There’s something rather amusing about watching Microsoft (a company that focuses on software development) being forced by the Linux community to improve the quality of Microsoft’s code. Anyone who thinks that FLOSS projects (which typically use widespread public peer review) always produce lower quality software than proprietary vendors just isn’t watching the real world (see my survey paper of quantitative FLOSS studies if you want more on that point). Peer review often exposes problems, so that they can be fixed, and that is what happened here.

Microsoft did not do this for the sheer thrill of it. Getting code into the mainline Linux kernel release, instead of just existing as a separate patch, is vitally important for an organization if they want people to use their software (if it needs to be part of the Linux kernel, as this did). A counter-example is that the Xen developers let KVM zoom ahead of them, because the Xen developers failed to set a high priority on getting full support for Xen into the mainline Linux kernel. As Thorsten Leemhuis at The H says, “There are many indications that the Xen developers should have put more effort into merging Xen support into the official kernel earlier. After all, while Xen was giving developers and distribution users a hard time with the old kernel, a new virtualisation star was rising on the open source horizon: KVM (Kernel-based Virtual Machine)… In the beginning, KVM could not touch the functional scope and speed of Xen. But soon, open source developers, Linux distributors, and companies such as AMD, Intel and IBM became interested in KVM and contributed a number of improvements, so that KVM quickly caught up and even moved past Xen in some respects.” Xen may do well in the future, but this is still a cautionary tale.

This doesn’t mean that Microsoft is suddenly releasing all its programs as free/libre/open source software (FLOSS). Far from it. It is obvious to me that Microsoft is contributing this code for the same reason many companies contribute to the Linux kernel and other FLOSS software projects: Money.

I think it is clear that Microsoft hopes that these changes to Linux will help Microsoft sell more Windows licenses. These changes enable Linux to run much better (e.g., more efficiently) on top of Microsoft Windows’ hypervisor (Hyper-V). Without them, people who want to run Linux on top of a hypervisor are much more likely to use products other than Microsoft’s. Microsoft doesn’t want to be at a competitive disadvantage in this market, so to sell its product, it chose to contribute changes to the Linux kernel. With this change, Microsoft Windows becomes a more viable option as a host operating system, running Linux as a guest.

Is this a big change? In some ways it is not. Microsoft has developed a number of FLOSS packages, such as WiX (for installing software on Windows), and it does all it can to encourage the development of FLOSS that run on Windows.

Still, it’s something of a change for Microsoft. Microsoft CEO Steve Ballmer stated in 2001 that Linux and the GNU GPL license were “a cancer”. This was in many ways an attack on FLOSS in general; the GNU GPL is the most popular FLOSS license by far, and a MITRE report found that the “GPL sufficiently dominates in DoD applications for a ban on GPL to closely approximate a full ban of all [FLOSS]”. This would have been disastrous for their customer, because MITRE found that FLOSS software “plays a far more critical role in the [Department of Defense] than has been generally recognized”. I think many other organizations would say the same. This is not even the first time Microsoft has gotten involved with the GPL. Microsoft sold Windows Services for Unix (SFU), which had GPL software, showing that even Microsoft understood that it was possible to make money while using the GPL license. But this more case is far more extreme; in this case Microsoft is actively helping a product (the Linux kernel) that it also competes with. I don’t expect Microsoft to keep contributing significantly to the Linux kernel, at least for a while, but that doesn’t matter; here we see that cash trumps ideology. More generally, this beautifully illustrates collaborative development: Anyone can choose to work on specific areas of a FLOSS program, for their own specific or selfish reasons, to co-produce works that help us all.

path: /oss | Current Weblog | permanent link to this entry