| Why ARM's EABI matters |
by Andres Calderon and Nelson Castillo (Mar. 14, 2007)
Foreword: -- This article describes the floating point performance benefits of the ARM EABI (embedded application binary interface), which now has its own Debian port. The authors use an open source floating point benchmark to compare how compiling with EABI support can improve floating point performance.
Incidentally, the authors did their benchmark testing on Carlos Camargo's ECB_AT91, a two-layer, 3.3 x 3 inch (85 x 77mm) board with an open source hardware design. Enjoy . . . !
Why ARM's EABI Matters
by Andres Calderon and Nelson Castillo
It's common nowadays to hear of the new ARM EABI (embedded application binary interface) Linux port. There are many motivations to start using it, but there is one we especially like -- it's much faster for floating point operations. Since many ARM cores lack a hardware FPU (floating point unit), any software acceleration is more than welcome.
It might be hard to switch to EABI, though. For instance, for the Debian distribution, EABI is actually considered a new port.
Without EABI
The ARM EABI improves the floating point performance. This is not surprising, if you read how your processor is wasting a lot of cycles now. From the Debian ARM-EABI wiki:
The current Debian port creates hardfloat FPA instructions. FPA comes from "Floating Point Accelerator." Since the FPA floating point unit was implemented only in very few ARM cores, these days FPA instructions are emulated in kernel via Illegal instruction faults. This is of course very inefficient: about 10 times slower that -msoftfloat for a FIR test program. The FPA unit also has the peculiarity of having mixed-endian doubles, which is usually the biggest grief for ARM porters, along with structure packing issues.
So, what does this mean? It means that the compilers usually generate instructions for a piece of hardware, namely a Floating Point Unit, that is not actually there! When you make a floating point operation, such at 3.58*x, the CPU runs into an illegal instruction, and it raises an exception. The kernel catches this specific exception and performs the intended float point operation, and then resumes executing the program. And this is slow because it implies a context switch.
The benchmark
We decided to make a simple benchmark using our Open Hardware Free ECB_AT91 ARM(ARMv4t) development board, based on an Atmel AT91RM9200 processor.
  The ECB_AT91, top and bottom (Click each image to enlarge) We used a simple benchmark we have used before: the dot product of two given vectors, the Euclidean distance of the vectors, and the FFT (fast Fourier transform) algorithm (complex valued, Cooley and Tukey radix-2). The source code we used is available here (GPL).
It's common to use the number of floating point operations per second (FLOPS) performed by a given program for benchmarking purposes. However, this can be misleading, because some operations (e.g. division) take more time than others (e.g. addition). To ensure uniformity, we ran the same program in both setups, with similar compiler flags.
First we tried the Old ABI using the Debian distribution (Debian Sid), and an image that we bootstrapped. Then, for the EABI test, we used the Angstrom Distribution, part of the OpenEmbedded project.
Results
 EABI vx. OABI, floating point benchmark (Free_ECP_AT91_V1.5, AT92RM9200) (Click to enlarge. Source: emQbit)
 EABI/OABI speed-up, floating point benchmark (Free_ECB_AT91_V1.5, AT92RM9200) (Click to enlarge) In each context switch, both the data and instruction cache are flushed, and this hurts the Old ABI's performance. You will notice it in the graphs because the performance with the old ABI does not depend on the size (N) of the input data, whereas in EABI the impact of the cache in the performance is seen clearly. The dot-product performance only goes down when N > 4096 (When we use more than 16KB in memory); the Atmel processor we're using has a 16 Kbyte data cache.
 About the authors: Andres Calderon (left) and Nelson Castillo (right) are co-founders of emQbit, an embedded hardware/software co-design company based in Columbia, South America. Both are long time Linux users. Andres has experience in high performance computing and in embedded systems design, DSP, and FPGA programming. Nelson has experience in Unix Network Programming, Linux driver programming, and embedded system programming.
Comments? Questions?
If you have questions or comments about this article, Talkback here
Related Stories:
(Click here for further information)
|
|
|
7 Advantages of D2D Backup
For decades, tape has been the backup medium of choice. But, now, disk-to-disk (D2D) backup is gaining in favor. Learn why you should make the move in this whitepaper.
4 Legal Reasons to Control Internet Access
The Internet is obviously a valuable resource for many organizations. However, many are exposed to legal liability concerns because they fail to control Internet access. Learn if you're safe in this white paper.
Rapidly Resolve J2EE Application Problems
Whether you are in the process of building J2EE applications or have J2EE applications already running in production, you must ensure that they deliver the expected ROI. Learn how in this white paper.
Load Testing 2.0 for Web 2.0
There are many unknowns in stress testing Web 2.0 applications. Find out how to test the performance of Web 2.0 in this white paper.
Build Better Games Online
For the game infrastructure providers, life is complex. Making money from games has become more complicated. Why? Find out in this white paper.
Building a Virtual Infrastructure from Servers to Storage
This white paper discusses the virtual storage solutions that reduce cost, increase storage utilization, and address the challenges of backing up and restoring Server environments.
Gaining Faster Wireless Connections with WiMAX
Welcome to what is quickly becoming the hyperconnected world where anything that would benefit from being connected to the network will be connected. Learn more in this white paper.
Is Your Desktop a Security Threat?
The new wave of sophisticated crimeware not only targets specific companies, but also targets desktops and laptops as backdoor entryways into those business’ operations and resources. Learn how to stay safe in this white paper.
Increasing SAN Reliability by 100 Percent
Storage area networks (SAN) are a strong part of storage plans. Learn how to increase your reliability and uptime by 100 percent in this case study.
|
|
|
|
|