Linaro supercharging Android and showing the power of Open Source

29comments
This article may contain personal views and opinion from the author.
Linaro supercharging Android and showing the power of Open Source
Those of you who pay attention may have noticed that Google and Apple have settled into an interesting routine with their respective updates for mobile products. Apple tends to focus on big software updates one year and big hardware updates the next. On the other hand, Google seems to have gotten into a routine of pushing a big feature/UI update, and follow that with a performance/under-the-hood update. Froyo and Ice Cream Sandwich have been feature/UI updates, while Gingerbread was a performance update. And, we expect Jelly Bean to also primarily be a performance update, especially since it is expected to be an incremental number (Android 4.1) rather than a full number bump (of course, that statement assumes a simple logic behind Google's version numbering system, when in reality it probably took a team of engineers to design the algorithm which decides the version numbering sequence). 

There will likely be a couple of features added to Jelly Bean, because it's hard to get people excited about a mostly under-the-hood update, but we don't expect too much. More than likely, we'll finally see the rumored Google newsstand magazine solution, and maybe some refinements to existing apps (like perhaps the somewhat useless stock People app (and we will keep ragging on Google for the failures of the People app until it is fixed, because carrier hooks aren't what we want.)) We don't expect the rumors of the dual-boot with Chrome OS to come to pass, but that is possible. Really, we expect Jelly Bean to be all about performance, and on that topic, it's reasonable to assume that a lot of the performance boosts we'll see will be due to the work of the Linaro team because of the process behind open source. We reached out to Linaro, and they gave us some great info on the project. 

Linaro

The Linaro team is a group of about 120 members who are dedicated to optimizing open-source software for use on ARM processors. The company is a not-for-profit organization that has been focused on helping partners optimize software for various hardware configurations, and is not affiliated with Google. Linaro has officially been working on optimizing Ubuntu Linux and Android and the results have been extremely impressive. And, we mean impressive, like making Ice Cream Sandwich run between 1 and 5 times faster depending on the metrics used to test. The improvements are mostly with the CPU, though there has been solid graphical updates, and supposedly an increase in SunSpider performance by around 30%, which is pretty amazing. 

The team achieves these improvements by optimizing the GNU Compiler Collection (GCC) toolchain, the Linux kernel, ARM power management, graphics and multimedia interfaces. The first line of optimization is a pretty simple one: use the latest stuff. Simply by using the latest Linux kernel (and leveraging that open source work from others), or using the newest version of the GCC tools to compile Android, everything runs faster. Of course, on top of that, Linaro does dig into the code itself (with about 1,500 lines of "generic Linaro optimization changes" made) to optimize the software even more.

And, the key to the optimizations is that they have been written for the "generic ARM technology that is common to all ARM SoC vendors", which allows the results to be seen on any ARM-based device. Of course, there are specific optimizations done to compensate for the idiosyncrasies of various iterations of ARM processor (like the different timing of Cortex A8 vs A9). The team has been working to ensure proper optimization on all ARM SoCs, and is looking forward to optimizing for the Cortex A15 which will be the basis of the next gen SoCs, like the Exynos 5 series, and OMAP 5 chipsets. Linaro has been getting resources (hardware, engineers, etc.) from certain manufacturers to help optimize the code including Samsung, Texas Instruments, Freescale, and ST-Ericsson. However, the company does not receive anything from NVIDIA or Qualcomm, and so does not officially optimize for those chips. Of course, because the Linaro work is all open source, NVIDIA and Qualcomm can still use it if they wish. 

Recommended Stories
Beyond optimizing the actual binary code, the Linaro team is also looking to help make updates more efficient. According to the team, one trouble in updating Linux system software is that the "closed blobs" (binary large object), which are used to optimize software for various hardware configurations, can cease to work when the kernel is updated, because there is no standardized interface for these blobs. With that in mind, the team has been working on Unified Memory Management (UMM), which should allow for easier updating of the kernel without causing trouble with the blobs. Remember, Android was running on variations of the Linux 2.6.x kernel all the way until Ice Cream Sandwich (the seventh major revision), which finally got the Linux kernel to 3.0.1 (although the newest stable kernel right now is 3.4.2, and Linaro uses kernel v3.2). 

AOSP

Of course, none of this work would matter all that much, except for one big key to the Android ecosystem: it's open source. Because of this, Linaro's work has already started being baked-in to new AOKP and CyanogenMod custom ROMs, and users are already seeing noticeable improvements in the speed of the system. Beyond the benefits for the mod community right now, this work has big implications for all Android users going forward. Linaro has been submitting its work to the upstream repositories for the GCC toolchain, Linux kernel, and most importantly for us, the Android Open Source Project (AOSP). 

According to Jean-Baptiste Queru, our favorite Technical Lead for AOSP, as of June 6th, at least two of the changes submitted by Linaro had already been accepted and merged into Android. It's hard to find exactly what changes were submitted, accepted, and merged, because there is a lot of activity in AOSP, and Linaro code is submitted by a number of different team members. So far, the known accepted changes have been bug fixes related to GCC compiling, and likely wouldn't have an impact on performance, but as Google accepts more Linaro submissions, there's a fair chance that the optimizations will make their way upstream to Android proper. Given how soon the expected launch of Jelly Bean is, it may not be feasible to expect the Linaro optimizations to be part of that code, so the next version of Android (presumed to be Key Lime Pie) may be a more likely place to find the improvements. 

There is always the chance that we won't see any of Linaro's changes, and that Google may make similar changes itself. Or, various manufacturers could submit more work to AOSP, which would both add optimizations for various hardware, and also make updates faster because manufacturers would already have needed changes baked-in to stock Android. Given the changes that were accepted from Linaro, it's safe to say that Jelly Bean will be using the newest GCC tool to compile, which will help in some ways, it's just a matter of what else Google has done. 

This is the power and the visibility problem in open source. Anyone can get in and make changes and improvements to the code, which can go a long way to crowd-sourcing the work of squashing bugs, or fixing security problems (as we've already seen). Unfortunately, because everything is open, we see the bigger improvements out in the wild a long time before they may be folded into the main code tree. Linaro is doing great work, but its best work may be relegated to CyanogenMod and AOKP for a long time before we see them filter into the main Android system, especially given the much slower update cycle that Google has transitioned into. 

Conclusion

So, now it's time to see what Google can do with this work. Linaro has undoubtedly made optimizations that make Android faster, and has submitted that work to the Android Open Source Project. Given that there are already builds of AOKP and CyanogenMod out for the Galaxy Nexus, Google could certainly have Linaro baked-in to a theoretical Android 4.0.6 update and pushed out to unlocked Galaxy Nexus users within weeks, but that's pretty unlikely to happen. 

Still, no matter if or when the work is merged into the main Android code tree, Linaro is going to keep working. And, based on what the team has accomplished so far, we're pretty intrigued to see what they can do moving forward. If nothing else, now is a great time to be part of the mod community in Android, because your favorite custom ROMs are likely to be getting a speed boost soon enough thanks to Linaro. 

sources: Linaro & Jean-Baptiste Queru (via Rashidi Zin)
Create a free account and join our vibrant community
Register to enjoy the full PhoneArena experience. Here’s what you get with your PhoneArena account:
  • Access members-only articles
  • Join community discussions
  • Share your own device reviews
  • Build your personal phone library
Register For Free

Recommended Stories

Loading Comments...
FCC OKs Cingular\'s purchase of AT&T Wireless