Testing Linux modules for ARM64

A Call to ARMs

Article from Issue 173/2015

Twenty years ago Linux was ported to a 64-bit RISC processor. Now the challenge is to put GNU/Linux on modern 64-bit ARM processors.

It has been 21 years since I first met Linux Torvalds in May 1994 and 20 years since the first DEC Alpha [1] port of GNU/Linux hit the streets in late 1995. At that time the Alpha was the fastest microprocessor in the world and the first 64-bit RISC processor that Linus supported with his source code tree. I was proud of how fast that processor ran GNU/Linux, and just to prove it was a real 64-bit port, Linus did an mmap of huge amounts of virtual memory, much more than a 32-bit system could support in one image.

Still, 20 years is a long time, and when you look back at the Alpha in light of today's processors it is relatively slow, running at clock speeds of 300-400MHz and using so much electricity that when we put one of the chips in a laptop, it gave one Navy Admiral who was wearing his summer white shorts third-degree burns on his knees … true story!

All of this reflects back to the performance contest [2] that Linaro has been sponsoring for the past year and two new events that made the performance contest easier to enter and win. The contest was originally conceived to test and port 1,400 software modules that contained assembly language to ARM's new 64-bit architecture.

To make the contest more interesting, a lot of these modules are probably not be performing at peak efficiency in modern architectures with more memory, more CPUs per system, more cores per CPU, more cache, and more efficient compilers than were available when those programs were first designed and coded. Thus, a secondary challenge was to make these programs work more efficiently for all architectures, perhaps by eliminating the assembly language in the modules and making them more portable.

Unfortunately, the scarcity and cost of early ARM64 hardware for use in porting and testing has reduced the number of people who want to participate. For the most part, only people who feel comfortable cross-compiling and cross-testing some of ARM's models for 64-bit architecture have entered the contest. Using these cross-architecture tools might be fine for some, but they are confusing and slow for most people, and real-life performance testing is generally not possible under emulation.

About a month before the recent Linaro Connect Meeting in Hong Kong, I started looking at the Debian testing release "Jessie" and the Fedora 21 release, which also supports ARM64. Additionally, the QEMU project has solidified a lot of ARM64 support, so between using QEMU and one of the new releases (either Debian "Jessie" or Fedora 21), you could generate a development environment in which to test modules "natively" to see if they work on ARM64 and port them to ARM64 "natively" without the painful issues of cross-compilation.

Now I put "natively" in quotes because most of the GNU/Linux community does not have ARM64 hardware, so the work has to be done through QEMU emulation. As a rough guide, most people have to do the following (using a Debian distribution for the sake of instruction):

  • Install x86 Debian Jessie on an Intel- or AMD-based system.
  • Install QEMU-ARM64 on an x86 Jessie system using apt-get install.
  • Install ARM64 Debian Jessie into an QEMU emulator.
  • Start using ARM64 Jessie for testing or development work.

Step-by-step instructions to do this are posted at the Linaro performance contest site [3].

At Linaro's Hong Kong Connect meeting, engineers come from all over the world to share their knowledge and participate in coding sessions. At that meeting, Linaro announced two Open Specifications: one for a "relatively inexpensive" consumer board and one for a "relatively inexpensive" server board. The quotes around "relatively inexpensive" indicate that these boards should not be compared with Raspberry Pi price points. These boards are meant for a different market and level of design and are not designed to hit a particular price point.

The first board of this program (called "96 boards" because the specification could be used for both 32-bit and 64-bit ARM chips) was designed by Hi-Key, using the HiSilicon Kirin 620 eight-core ARM Cortex-A53 64-bit SoC running at 1.2GHz. Its price is $129. The board generates more than 10,000 Dhrystone VAX MIPS total performance.

It was this last figure that really caught my eye. Some of the first Alpha processors were around 500 Dhrystones, so this means that the Hi-Key is performing about 20 times faster than those first Alphas and at a very small fraction of the cost.

Twenty times the computing power of an Alpha processor in 20 years.

More importantly in today's market, that Admiral would be able to use his notebook computer without burning his kneecaps off, and he would not have to sell one of his battleships to afford one.


  1. DEC Alpha: http://en.wikipedia.org/wiki/DEC_Alpha
  2. Linaro performance challenge: http://performance.linaro.org
  3. ARM coding environment: http://performance.linaro.org/setup/

The Author

Jon "maddog" Hall is an author, educator, computer scientist, and free software pioneer who has been a passionate advocate for Linux since 1994 when he first met Linus Torvalds and facilitated the port of Linux to a 64-bit system. He serves as president of Linux International®.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95