In November last year, we reported on a patch for the Linux kernel that does wonder to the performance of the kernel under heavy load. The patch was all over the news because it drops the system latency to around 60 times under average conditions and 10 times under heavy load.
This patch has been finally merged with the kernel in the latest release of the Linux kernel (2.6.38). Announcing the inclusion of the patch, Linus Torvalds said that it is one his favorite additions in the new kernel. This is what he said about the patch:
It really works very well for the kinds of things it is designed for. If you still do ‘real work’ in a terminal window, you’re likely to appreciate it. Compile in parallel in one window, watch a movie in another, and the movie is really smooth. It can be very noticeable indeed.
The “wonder patch” is known technically as “automatic process grouping”. It works by changing the way by which the CPU scheduler assigns CPU time to each processes. When a process is forked into different child processes, the session ID of the original process is inherited by the child processes. With the patch applied, the kernel will group processes that have the same session ID as a single entity and the CPU scheduler will grant CPU time accordingly.
The automatic process grouping is not the only exciting addition in the Linux kernel 2.6.38. Changes has also been made in the whole path lookup mechanisms of the Linux VFS to make it more scalable in multi-threaded workloads. A very interesting result of this is that even for single threaded workloads the performance has improved quite significantly.
Users of AMD Fusion would also be happy to know that support for AMD Fusion has been added in the Linux kernel 2.6.38. There has been significant improvements in the support for wireless networking. One of the most interesting additions here is the BATMAN Mesh Protocol. It is an acronym for “Better Approach To Mobile Adhoc Networking” and has nothing to do with the super hero. BATMAN is a routing protocol for in which each node participates in routing by forwarding data for other nodes, and so the determination of which nodes forward data is made dynamically based on the network connectivity.
The Linux kernel 2.6.38 is expected to be included in all the major Linux distributions like Ubuntu 11.04 and Fedora 15, which are expected to be released this spring, and Mandriva 2011, which is expected this summer.
If you want to know more, you can read about it at kernelnewbies.org.