What’s new in Linux 2.6.36?

The new kernel version is notable because it hasn’t grown in size â€“ yet it contains hundreds of advancements which will be obvious to end users, who don’t often notice changes in their Linux distribution’s kernel. \r\n\r\n

After 80 days of development Linus Torvalds hasÂ released Linux version 2.6.36. ItÂ got the name “Flesh-Eating Bats with Fangs” with the eight pre-release; Torvalds was inspired by a bat that recently found its wayÂ into his house. The new Linux kernel is no larger than its immediate predecessor â€“ a rarity, as over the past few years the kernel sources have grown by several hundred thousand lines of code with every new version released in the main development branch.

\r\nThe kernel hasn’t grown in size because the developers considerably trimmed down the default configuration files. However, other patches have introduced plenty of new source code, allowing 2.6.36 to offer numerous noteworthy new features â€“ for instance, the long-disputed AppArmor security extension, a new Out-of-Memory (OOM) killer, kernel thread improvements, basic Xen Dom0 support and various file system and related VFS optimisations. The kernel hackers also fixed a bug in the VM subsystem which caused certain systems to become unbearably slow when writing to slow storage media. Other changes promise to make systems appear faster through improved response times. As usual, the new version also contains numerous new and improved drivers â€“ for instance, the Nouveau driver for NVIDIA graphics chips now supports the Fermi chips used in recent GeForce graphics cards. The kernel hackers also considerably improved the support of infra-red remote controls and receivers.\r\n\r\nThe following Kernel Log offers an overview of these and many further new features of Linux 2.6.36. These changes will eventually impact all Linux users as Linux distributions adopt the 2.6.36 kernel, or subsequent point releases, and make these improvements available to end users. At the end of this article, the Kernel Log will also take a peek at the advancements that might make it into 2.6.37.\r\n

\r\n

Downloading the Linux kernel

\r\nNew versions of Linux can be obtained from theÂ Kernel.org servers; the contents of these servers are also mirrored on numerousÂ mirrors internationally. However, Linux users who are not familiar with the details of the kernel and its environment should generally not install new Linux drivers and kernels themselves but use the kernels provided by the Linux distributors instead.

\r\n

Details

\r\nThis article provides an overview of the most important changes of Linux version 2.6.36.\r\n

bout the source code management system

\r\n

Many of the links in this article point to the relevant commits in theÂ web front end of Linus Torvalds’Â Git source code management system for Linux, because these commits tend to contain a lot more information about the respective changes. The commit comment in the mid section of the web page displayed by the Git web front end is often a particularly helpful source of further information. This is where the author of a patch usually describes the background and intended effects of the changes.\r\n\r\nThe bottom section of the Git web front end lists the files that are affected by the patch. The “diff” link behind each file name shows how the patch modifies the respective file; if you want to view the complete patch in its raw form, click on the commitdiff link. Even if you don’t have any programming skills the patches are often a good source of information, because they also contain changes to the documentation and comments within the code.

\r\n

Networking

\r\nDue to SR-IOV, the new cxgb4vf driver for guest systems can now directly access some of the features offered by Chelsio’s 1-Gigabit and 10-Gigabit network chips; as with other SR-IOV drivers, this is designed to reduce latencies and CPU loads for network transfers and increase data throughput (for instanceÂ 1,Â 2,Â 3,Â 4,Â 5). The Atheros ath9k Wi-Fi driver can now talk toÂ version 2.2 of the AR9003 chip. TheÂ Minstrel rate control algorithm, which originated from the MadWifi project and automatically selects the most suitable transmission method, now supportsÂ 802.11n transmissions. The ipheth iPhone tethering driver can now interact with theÂ iPhoneÂ 4.\r\n

Architecture code

\r\nWith 2.6.36, the list of processor architectures supported by the kernel has grown and now also includes Tilera’s TILEPro and TILE64 32-bit processors (for instanceÂ 1,Â 2,Â 3). Support for NVIDIA’s Tegra processors, which are based on the ARM architecture, has been added to the kernel from the Android environment (for instanceÂ 1,Â 2,Â 3).\r\n\r\nKVM now offers support of the Xsave (1,Â 2) andÂ AVX (Intel Advanced Vector Extension) processor commands in guest systems. An overview of the changes to the Xen code is available in the Git-Pull requests byÂ Jeremy Fitzhardinge andÂ Konrad Rzeszutek Wilk. Some of them provide the foundations for code that will allow running the Linux kernel as an “initial domain” â€“ a kind of trimmed-down Dom0 support. This code is currently beingÂ discussed on the LKML and could make it into the Linux main development branch in one of the next few versions.\r\n

Memory and thread management

\r\nThe kernel developers have considerably changed and largely rewritten the Out-of-Memory (OOM) killer that shuts down processes during memory shortages so a system can continue to function (1,Â 2,Â 3). The kernel hackers have also integrated “Concurrency Managed Workqueues” to optimise the handling of kernel threads (for instanceÂ 1,Â documentation). This technology is designed to make the kernel more efficient in terms of resources, enhance scaling and reduce the number of kernel threads on many systems â€“ the latter will be noted by users as it also reduces the list of kernel threads returned by “ps -A”.\r\n

Security

\r\nHaving tried for several years to integrate their security extension into the kernel code, the developers ofÂ AppArmor, which was made available to the open source community by Novell in 2006, have finally managed to incorporate their extension into kernel version 2.6.36 (for instanceÂ 1,Â 2,Â 3,Â documentation). Similar to SELinux, AppArmor can restrict applications to a set variety of actions; as a result, attackers who obtain system access, for instance, through a security hole in the server software, can only do limited damage.\r\n\r\nOver the years numerous attempts had also been made to integrate TALPA-based Fanotify before Torvalds included it in the forthcoming version (for instanceÂ 1,Â 2,Â 3). It is based on Fsnotify, which was integrated and adapted in 2.6.31, and offers entry points which allow, for example, the integration of virus scanners that check accessed files for malicious software before delivering the files content (“on-access scan”).\r\n\r\nJust days before completion of Linux 2.6.36, the developersÂ deactivated the Fanotify user-space interface after a few issues that may have in future, to some extent, affected the ABI were discovered (1,Â 2,Â 3). This means that, for now, Fanotify is not usable. The developers are correcting the errors behind these issues and plan to re-activate the user-space interfaces for Linux 2.6.37; it is unclear if the patches will be applied to the stable 2.6.36 kernel series.\r\n

Trimmed

\r\nThe kbuild code now offers the targets “oldnoconfig“, “listnewconfig“, “alldefconfig“, and “savedefconfig“. The latter writes a configuration file called “defconfig” which only includes the options that differ from the default settings listed in the kconfig files. Using this make target, the developers have generated dozens of default configuration files for the various system and processor architectures supported by the Linux kernel to replace the previous standard configuration files. As the latter used to include all the default options also listed in the kernel’s kconfig files, the relatedÂ giant commit of almost 6Â Mbytes removes more than two hundred thousand lines of code in the kernel sources.\r\n\r\nThe maintainers of the code for Itanium (IA64) and PowerPC support had already trimmed down their configuration files in the same way (1,Â 2). These changes are the main reason for the source code of 2.6.36 remaining around the same size as its its immediate predecessor â€“ which is very unusual, as in the past few years previous kernels have grown by several hundred thousand lines with every new version. The default configuration files’ slimming diet already startedÂ in 2.6.35, when the kernel developers trimmed the files for ARM systems. None of these changes affect Linux users, as “make defconfig” continues to create a basic configuration file for a system in the same way as before.\r\n

\r\n

Which drivers were changed

\r\nInformation about the changes to individual Linux kernel files can be found through the Git web front end at Kernel.org â€“ this, for example, allows users to find out whether there have been changes to the drivers used on their own systems. To do this, however, users need to know where in the Linux kernel’s source code tree the driver files are located. For the heavily modular distribution kernels the modinfo program is often helpful when searching:\r\n

\r\nIf a compiled module is, for example, located at […]/kernel/drivers/net/e100.ko, its source code in the Linux source code archive can usually be found in a file with a similar name in the drivers/net/ directory â€“ for example e100.c for the e100 driver for Intel 100 MBit networking hardware. Other modules like the e1000 driver for Intel’s PCI Gigabit LAN chips, on the other hand, have a whole directory to themselves. If the approximate location of the driver source code is known, users can navigate to the respective source code files in theÂ tree view of the Git web interface and can then retrieve an overview of the latest file or directory changes via the history link. In theÂ network driver directory, changes to the driver code ofÂ e100 (drivers/net/e100.c) andÂ e1000 (drivers/net/e1000/), for example, can be displayed and examined in this way.

\r\n

In brief

\r\n

\r\n

The kernel hackers have further reduced the use of the Big Kernel Lock (BKL) in the infrastructure code and in numerous drivers. This brings the developers another step closer to their aim of making the kernel work without this bulky locking mechanism that decreases scalability, and therefore system performance, on standard systems.

\r\n

\r\n

\r\n

In certain circumstances, the process scheduler now reduces the competition between kernel threads that are trying to gain exclusive control of a resource which is in use. This causes fewer disruptions to the active process and can considerably improve data throughput (commit,Â article on LWN.net).

\r\n

\r\n

\r\n

Almost a month after the closing of the merge window, the kernel hackers have made a change to the process scheduler to reduce maximum latencies, for instance when other parallel processes are claiming CPU time, especially on desktop systems â€“ this promises to improve response times and is said to make systems appear faster. TheÂ discussion preceding the changes and theÂ commit comment provide background information as well as some values measured in a test scenario that show the maximum latency as reduced to almost half of the original amount.

\r\n

\r\n

\r\n

With 2.6.36, the kernel hackers hope to haveÂ fixed the problem that existed under 2.6.35 and several previous kernels, that in certain circumstances, caused systems to appear extremely slow or occasionally cease to respond altogether while the kernel wrote large amounts of data to a slow storage medium (such as a USB Flash drive) (for instanceÂ 1).

\r\n

\r\n

\r\n

TheÂ new interfaces in 2.6.36 display which PCI / PCIe devices use the power-saving modes of I/O devices and to what extent during runtime; theÂ recently released version 1.13 ofÂ PowerTop can already read out, process, and output this data.

\r\n

\r\n

\r\n

TheÂ ideapad driver for the Lenovo netbooks of the same name has been added to the platform subsystem.

\r\n

\r\n

\r\n

The new scroll acceleration in the driver for Magic Mouse, which sometimes confuses users, is nowÂ disabled in standard settings and has to be enabled via a module parameter.

Overview of 2.6.36

\r\nDespite its almost unchanged size and its relatively short development time, Linux 2.6.36 yet again offers a range of improvements. Linux users are likely to benefit particularly from the optimisations and bug fixes in the memory management area, and from the faster response times. Furthermore, the future of the AppArmor extension used, for instance, in Ubuntu, looks far rosier, now that AppArmor has been integrated into the main development branch.\r\n\r\nAs usual, many new and improved drivers are set to have strong short-term as well as long-term effects â€“ such as the extended support of USB and IR hardware. In the long run, the developers may also make something of the perhaps slightly exotic-looking KDB shell, which is currently only available via Intel’s KMS driver and simplifies troubleshooting for advanced users and system administrators.\r\n

Kernel trends: Coming in 2.6.37

\r\nDirectly following the release of 2.6.36, the first, merge window phase of the Linux kernel development cycle commences again. Usually this phase takes a full two weeks, but this time around it is likely to takeÂ only ten days. During this phase the kernel development team incorporates the many changes for the next version of the kernel into the main development branch. Numerous changes have already been prepared for this first phase of the next development cycle. Among them are some we have already mentioned, like the “VFS scalability patches”.\r\n

\r\n

Linux kernel development cycle

\r\nThanks to the open development process and a long perusal of the tea leaves, TheÂ H and theÂ Linux Weather Forecast maintained by the Linux Foundation are already in a position to talk about some of the new features likely to be part of the next version of the kernel.

\r\nFurther improvements that may make it into 2.3.7 includeÂ numerous changes to the file system code and the block layer code. These changes allow write barriers to be handled differently internally and be used less frequently, which promises to improve performance; background information can be found in anÂ article on LWN.net. It is also likely that the developers will introduce patches that allow users to compile a kernel which doesn’t require the Big Kernel Lock (BKL); more details are available in anotherÂ article on LWN.net.\r\n\r\nAlso in preparation are extensions to the Radeon and Nouveau KMS drivers that will enable these drivers to support the KDB shell, which is only available via Intel’s KMS drivers in 2.6.36. The staging area is to include theÂ r8712u driver for RTL8192 USB chips; theÂ carl9170 driver is set to replace the otus driver (staging area) and the ar9170usb driver. The Linux main development branch is planned to includeÂ driver code for Apple’s Magic Trackpad. Major changes to theÂ udlfb DisplayLink driver are also in preparation — however, this driver will remain in the staging area for the time being.\r\n\r\nThe coming days will reveal which of these changes will actually be incorporated into the main development branch by Torvalds. As usual, the Kernel Log will summarise these and other developments in the Linux kernel field â€“ including new point releases of the stable kernel series (2.6.x.y), which should, over the next few weeks, fix the odd bug or two overlooked by hackers and testers during 2.6.36 development.\r\n