Testing Linux modules for ARM64
A Call to ARMs
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.
Infos
- DEC Alpha: http://en.wikipedia.org/wiki/DEC_Alpha
- Linaro performance challenge: http://performance.linaro.org
- ARM coding environment: http://performance.linaro.org/setup/
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.