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

$ /sbin/modinfo e100 e1000 | grep filename:\r\nfilename:       /lib/modules/[...]/kernel/drivers/net/e100.ko\r\nfilename:       /lib/modules/[...]/kernel/drivers/net/e1000/e1000.k

\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.
  • \r\n

\r\n

Facts and figures for the latest versions of the Linux kernel

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

\r\n

Linux\r\nVersion Files1 Source lines2 Days Commits3 Changes4
2.6.29 26668 11010647\r\n(9871260) 89 11718 10933 files changed\r\n1347290 insertions(+)\r\n532055 deletions(-)
2.6.30 27879 11637173\r\n(10419567) 78 11989 10259 files changed\r\n1086737 insertions(+)\r\n460298 deletions(-)
2.6.31 29111 12046317\r\n(10778469) 92 10883 8938 files changed\r\n914135 insertions(+)\r\n504980 deletions(-)
2.6.32 30485 12606910\r\n(11242136) 84 10998 10315 files changed\r\n1092987 insertions(+)\r\n530428 deletions(-)
2.6.33 31565 12990041\r\n(11564768) 83 10871 9673 files changed\r\n859458 insertions(+)\r\n479452 deletions(-)
2.6.34 32297 13320934\r\n(11861616) 82 9443 11154 files changed\r\n609584 insertions(+)\r\n278958 deletions(-)
2.6.35 33316 13545604\r\n(12250679) 77 9801 8889 files changed\r\n691927 insertions(+)\r\n467252 deletions(-)
2.6.36 34301 13499457\r\n(12539782) 80 9501 9202 files changed\r\n582139 insertions(+)\r\n628362 deletions(-)
¹ find . -type f -not -regex ‘\./\.git/.*’ | wc -l\r\n² (Without documentation): find . -type f -not -regex ‘\./\.git.*’ | xargs cat | wc -l (find . -name *.[hcS] -not -regex ‘\./\.git.*’ | xargs cat | wc -l)\r\n³ git-log –no-merges –pretty=oneline v2.6.(x-1)..v2.6.(x) | wc -l\r\n⁴ git diff –shortstat v2.6.(x-1)..v2.6.(x)

\r\n

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

By: Thorsten Leemhuis

\r\nSource: HOpen Source

2 thoughts on “What’s new in Linux 2.6.36?”

  1. Pingback: sSysAdmin blog

Comments are closed.