[PATCH] ARM: makefile: add tuning options for Armada 370/XP

Willy Tarreau w at 1wt.eu
Sat Apr 6 17:54:43 EDT 2013


Hi Grégory,

On Sat, Apr 06, 2013 at 11:48:28PM +0200, Gregory CLEMENT wrote:
> Hi Willy,
> 
> On 04/06/2013 09:29 PM, Willy Tarreau wrote:
> > Hi,
> > 
> > A patch from Marvell was merged in GCC 4.8 to add support for their
> > PJ4 CPU core used in Armada370 and XP. I noticed a steady 2% network
> > performance increase using -mcpu=marvell-pj4 and around 1% when using
> > -mtune=xscale instead. I have no idea whether it provides anything to
> > the Dove platform and I don't have one to test, so I didn't touch it.
> > 
> > Now that 4.8 is released, it would be nice to have this option used
> > when supported.
> 
> Sure it will be very nice! But what happens when the kernel is built
> in multiarch?
> It seems to me that in this case gcc will tune the code for PJ4 whereas
> the kernel built can also be run on a Cortex-A, a Scorpion or a Krait.

I have not thought about that. Maybe we're already reaching the limits of
the multiarch mode ? After all, pj4 is not a cortex-a, which probably is
the reason that justifies having specific gcc optimizations that are
different from cortex-a.

So in the end, I'm starting to wonder whether it makes sense to permit
non-100% compatible armv7 chips to coexist in the same kernel :-/

Otherwise we could do what already exists on x86, which is to let the
user select which chip he wants to optimize for. I have no idea on the
subject to be honnest.

Best regards,
Willy




More information about the linux-arm-kernel mailing list