Skip to content

Improve performance by changing default machine tuning options #25

@KristofRobot

Description

@KristofRobot

Note: I am focusing on Cubieboard2 in this post, as that is the board I own and can test on, but this should be relevant to other boards as well

Currently our cubieboard2 machine.conf file [1] falls back on the default tuning option specified in arch-armv7a.inc [2]:

DEFAULTTUNE ?= "armv7a-neon"

This boils down to the following compiler options:

-march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon

That is really the lowest performance option, and cubieboard2 is capable of more than that.
Specifically, it supports NEONv2, VFPv4 and Thumb-2 (see [3] and [4] ) - but the default tuning file does not take advantage of that.

I'd propose to set the default tune to something that supports all the capabilities of the Allwinner A20 chip, i.e.:

DEFAULTTUNE = "cortexa7thf-neon"

resulting in

-march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7

Note that this still does not take advantage of the NEONv2/VFPv4 capabilities of the Allwinner A20 - for that we'd need -mfpu=neon-vfpv4 [5]. I am currently using an ugly hack to force this compile option in my builds, and opened a request upstream to add this ([6]).

I'll try to run some benchmarks comparing the default with the proposed tuning options above, to put some data behind this, and get an idea of how big the difference is really.

In the meantime, all comments welcome.

Thanks!

Kristof

[1] https://github.com/linux-sunxi/meta-sunxi/blob/master/conf/machine/cubieboard2.conf
[2] https://github.com/openembedded/oe-core/blob/master/meta/conf/machine/include/tune-cortexa7.inc
[3] http://linux-sunxi.org/Allwinner_SoC_Family
[4] http://wits-hep.blogspot.fr/2013/12/fftw-benchmarks-on-cortex-a7.html
[5] http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
[6] https://bugzilla.yoctoproject.org/show_bug.cgi?id=5710

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions