Just in case you didn’t know, Android is built atop the Linux kernel. A few patches here, a few branches there, pepper in some code, and Android was created. Unfortunately a lot of the patches were never sent upstream, this means some of the hard work done by the engineers at Google never made it out of the phones and into desktop or server hardware. The Android Mainlining Project aims to solve this.
Greg Kroah-Hartman, head of the Linux Driver Project, has created a new project with 3 major goals in mind.
- To allow a developer to use the latest released version of the Linux kernel to run an Android system, without requiring patches to their kernel.
- To make it possible to develop drivers and board support features against either an Android kernel release or a kernel.org kernel release, with little or no modifications or conditional code.
- To reduce or eliminate the burden of maintaining independent patches from release to release for Android kernel developers.
This means all the Android-specific code that was purposely left out of kernel releases, will now be easier to implement and merge with the development branch of the 3.3 kernel. Systems like Android’s logging, low memory kills and wakelock power management will be branched-in, allowing for more hardware access to third party boards and systems with memory or power restraints.
In an e-mail to the Embedded Linux Kernel mailing-list, Tim Bird, Architecture Group Chair, CE Workgroup of the Linux Foundation, states that the project was born after discussion and re-evaluation code from Android. With a current stable kernel of 3.19, mainline at 3.2-rc7, there are only a few dot-releases before the project aims to be completed.
Numerous volunteers have signed up for the project, and many have started to contribute patches and code for smooth integration. Without support from Google and AOSP, it’s highly unlikely that both kernels will ever reach parity, but this is quite an excellent start in order to bridge the gap and create a unified kernel that will benefit all users.
ARM support in the Linux kernel has been a debated issue for too long and today, it stands at a point where it is making more compromises. Every device with its own code for ARM support creates a bloatware out of the entire ARM section in the Linux kernel. This is a huge dilemma because if these codes are not submitted at the end of the day, it will (probably) be termed as a violation of GPL v2 and if they are submitted, they are too complex to include into the kernel. So they just lay there.
With a mini community of independent agents formed inside the Linux kernel developer community itself, these device manufacturers are finding it hard to get their ARM changes upstream into the mainline kernel. The reason?
- There are too many of them
- They are highly complex in their own way
- Most of them are just redundant
In short, there is utter chaos when it comes to ARM support in the Linux kernel and it was best left ignored until now.
The scenario is taking a turn and attempts are being made to standardize the process. ARM has moved to a separate Git tree but it still annoyed the maintainer all the more. Torvalds is rightfully annoyed here, as he would not include every bit of code that some device manufacturer somewhere has written to support some hardware that few people use!
This is a strong but a welcome decision because in the long run, it will keep hardware vendors from breaking the Linux ecosystem and acting in a more co-operative and a less competitive way.
The state of ARM in Linux kernel can still be ignored all right but we have seen how Microsoft is talking of a Windows 8 tablet now. ARM is indeed important for the future of portable and mobile computing and undoubtedly, Linux plays a major role in its future. The sooner they marry, the better it is for both of them.
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.
Many people had hoped that the Nexus S will be equipped with a dual-core processor but sadly that did not turn out to be true. The Nexus S uses a 1 GHz SoC (Silicon-on-Chip) Hummingbird processor. The same processor is used across the different variants of the Galaxy S line-up. Now, an XDA member morfic has released a new kernel Trinity – for the Nexus S which overclocks the processor to 1.2GHz.
The developer of the kernel has also tweaked the voltages for a better battery life. However, this kernel is still a work in progress as the Bluetooth still does not work. The kernel is compatible only with Bionix NS1 custom ROM for the Nexus S.
The 1GHz processor inside the Nexus S is no slow-couch. However, I hope this kernel will satisfy the thirst of speed for all those people who were disappointed with the Hummingbird processor.
The Linux Foundation has published their annual document highlighting the state of the Linux kernel development.
This year, the number of commits have decreased by 18%, in comparison to the increase by significant number. The report highlights that the previous year’s increased commit amounts can be attributed to the release of 2.6.30 kernel which brought in new additions such as Btrfs filesystem and perf. This year, however, saw a decrease due to maturity of existing components such as the ext4.
Release Frequency & Rate of Change
Over the past year, 3 versions have been released – 2.6.33 , 2.6.34 & 2.6.35 with each version being in development for 84, 81 & 77 days respectively.
2.6.33, 2.6.34 & 2.6.35 brought in 10.8k, 9.4k and 9.8k patches respectively – resulting in an average of 5 patches per hour. 2.6.35 currently stands at about 13.5 million lines of code, up from about 1.5million lines since the last year’s update.
Who’s doing all this work ?
2.6.35 attracted a total of 1,187 different individuals and 184 different companies working on it. David S. Miller, Ingo Molnar & Al Viro constitute the top individual contributors at 1.3%, 1.2% and 1.2% each of the overall total. It’s interesting to note that Linus doesn’t feature in top-30 list of contributors w.r.t patches – this is primarily due to Linus’ role as a reviewer and handling patchmerges.
How many sponsors?
Interestingly, the people who have no financial backing from any company constitutes for 18.9% of the total commits. Red Hat comes in second at 12.4% and Novell at about 7%. Amongst companies involved in embedded & mobile devices development, Nokia contribution weighs in at about 2.3%. Although Google employs some senior kernel developers such as Theodore Ts’o, the contribution is about 0.6%.
These are some of the excerpts from the published paper – you can grab the full details over here [PDF link] for the full details.
Two days back we reported about a 200 line patch for the Linux kernel which increases the system responsiveness under heavy load. The patch was applied to the Linux kernel not long ago and so it will take some time to appear for most of the users.
Interestingly, a RedHat developer, Lennart Poettering, has come up with an alternative to the kernel patch which does exactly the same thing. The most unbelievable thing about Poettering’s alternative is that it consist of just four lines of code which has to be added to the ~/.bashrc file.
Poettering’s method is ready for use by anyone. All you have to do is add the floowing lines of code in the ~/.bashrc file: (Note: I have not tried this myself.)
if [ "$PS1" ] ; then
mkdir -m 0700 /sys/fs/cgroup/cpu/user/$$
echo $$ > /sys/fs/cgroup/cpu/user/$$/tasks
After adding these commands run the following commands as super user:
mount -t cgroup cgroup /sys/fs/cgroup/cpu -o cpu
mkdir -m 0777 /sys/fs/cgroup/cpu/user
It seems unbelievable that just these four lines of code can do the same function as a 200+ lines of kernel patch. However, there are indications that Poettering’s method might be actually better than the original kernel patch.
For Ubuntu users who want to try this, WebUpd8 has a step-by-step tutorial on how to do it.
An ancient kernel hole in Linux, which has been present from 2003, was recently closed after constant nagging and bug reports. The problem was with the X server using a huge stack that has a good chance of running into an adjacent heap memory.
The same vulnerability was cited earlier and was brought to the notice of the Linux security team a number of times but they turned a deaf ear to it each time. Only recently, they have taken this seriously and Torvalds has finally fixed this bug. However, the bugfix itself requires a further fix and the complete change will appear in the next stable update of the Linux kernel. As for those running a development version, it is available for download here.
Torvalds has implemented a guard between the stack and the heap so that the stack does not overrun the heap memory in any case. However, people everywhere are frowning upon the time of two months this problem took to be fixed, after the first citation and the first formal reporting. Linux has been held in high esteem for its security and this matter has earned Linux some bad name already.
Keith Packard, an X.org hacker was also working on a fix for this but his code was rejected by Torvalds as it violated some internal VM rules. The vulnerability was of an extremely serious nature. As Rutkowska puts it,
While it isn’t a direct remote exploit, it only takes one vulnerable X client (web browser, PDF viewer, etc.) to turn it into something that is remotely exploitable.
The HTC Droid Incredible is a very popular phone in the US. The phone features a 3.7-inch AMOLED screen with a WVGA resolution. It was a month ago that the Droid Incredible was rooted. The Droid Incredible was comparatively a tough nut to crack than other Android phones. Custom ROMs for the Droid Incredible are scarce as well. The reason behind this is that HTC did not release the source code of the Droid Incredible’s kernel.
However, today HTC released the kernel source code of the Droid Incredible. The kernel source code also contains bits and pieces of Froyo code which should help developers. This will help the developers produce some quality and bug free ROMs for the Incredible. Along with the Droid Incredible, HTC also released the kernel source code of the Desire, Wildfire, Aria and the EVO 4G. Here is the link to download them.
The latest release of the Linux kernel 2.6.35 has brought significant changes to the kernel. Released on Sunday this week, the kernel claims to have significant improvements along the improvement in behavior of packets and over network throughput.
The new technologies borrowed from Google are RFS and RPS. These help in modifying the behavior of packets in a network. RPS spreads a process into all cores and RFS searches for the ideal core for performing jobs. RSP stands for receive packet steering and RFS for receive flow steering. As an evidence of increased performance, Joab Jackson at Networkworld has written,
The site cited a benchmark test showing how an eight-core Intel CPU-based server, with an Intel e1000e network adapter, doubled the number of networking-based transactions-per-second (tps) it could execute with RPS and RFS in place, from 104,000 tps (at about 30 percent CPU usage), to 303,000 tps (and 61 percent CPU usage).
This is good news compared to the earlier development of Linux. This move will popularize builds based on this new kernel.
Linus Torvalds has announced the release of the Linux Kernel version 2.6.34 on Sunday this week. This new kernel has come after months of development and Linus made the release announcement at the unofficial Linux Kernel Mailing List lkml.org. He wrote,
Nothing very interesting here, which is just how I like it. Various random
fixes all over, nothing really stands out. Pretty much all of it is one-
or few-liners, I think the biggest patch in the last week was fixing some
semantics for the new SR-IOV VF netlink interface. And even that wasn't
a _big_ patch by any means.
So 2.6.34 is out, and the merge window is thus officially open.
The new Linux Kernel, version 2.6.34 has a new LogFS file-system file system, a faster networking support on KVM virtualization, updates on Btrfs file-system and many other GPU driver updates.
A complete list of changes can be found here.
Now that Kernel 2.6.34 is out, developers are focusing on bug fixes and the next kernel 2.6.35. Plans for the next kernel include improved support for ATI graphics and Intel H.264 video acceleration.
Linus Torvalds has decided to take some rest for a day or two now that a new milestone is reached. Though, it is not long before he gets back to work in full form. A list of bugs has already appeared on the release post which will surely give him the Monday morning blues.
The Linux Kernel version 2.6.34 RC1 has been released on Monday. This release lets us have a better insight into the next Linux kernel which will bring many new features. The release was announced by Linus Torvalds and this new Kernel has some amazing features.
There have been major improvements in graphics and a new file system has been added. Other than that there are improvements in virtualization and changes in nouveau.
Over at lklm.org, Linus writes,
As usual, there’s tons of changes, with about 50% of the changes being
under drivers/. With an additional 5% in sound/, which has its own
subdirectory, and 10% being firmware/, we’re looking at about two thirds
All in all, about 850 developers involved so far (there migth be a few
dups there, I didn’t check too closely), 6500+ files changed, 400,000+
lines added, ~175,000 lines deleted. Too much to really summarize, in
Kernel 2.6.34 has got a new filesystem, named Logfs. Logfs is a scalable flash filesystem and is suitable for large flash memory devices as well as for small ones. At present, Logfs is available only for the Linux platform. The GPU DRM updates make up a huge part of the 50% of changes mentioned in the quote above.
The news of the release appeared on Monday, 8th March at lkml.org.