[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250322215310.7b69b8a1@pumpkin>
Date: Sat, 22 Mar 2025 21:53:10 +0000
From: David Laight <david.laight.linux@...il.com>
To: "Arnd Bergmann" <arnd@...nel.org>
Cc: "Tor Vic" <torvic9@...lbox.org>, x86@...nel.org,
linux-kernel@...r.kernel.org, "Borislav Petkov" <bp@...en8.de>, "Thomas
Gleixner" <tglx@...utronix.de>, "Ingo Molnar" <mingo@...hat.com>, "H. Peter
Anvin" <hpa@...or.com>
Subject: Re: [PATCH] arch/x86: Add an option to build the kernel with
'-march=native' on x86-64
On Sat, 22 Mar 2025 12:40:08 +0100
"Arnd Bergmann" <arnd@...nel.org> wrote:
...
> I assume that the difference here is that -march=native on
> your machine gets turned into -march=skylake, which then turns
> on both additional instructions and a different instruction
> scheduler.
>
> Are you able to quickly run the same tests again using
> just one of the two?
>
> a) -march=x86-64 -mtune=skylake
> b) -march=skylake -mtune=generic
I've wondered what -mtune=generic is actually optimised for?
I've seen gcc convert 32 bit add into an lea and then have
to use another instruction to clear the high bits.
I've not fiddled with the options to see why it does that.
My only guess is it is avoiding false dependencies against
the flags register - but the flags are split on non-archaic
cpu so that doesn't matter.
David
Powered by blists - more mailing lists