[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z1isfhgmZF6UxvkH@localhost>
Date: Tue, 10 Dec 2024 13:02:54 -0800
From: Josh Triplett <josh@...htriplett.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org,
Arnd Bergmann <arnd@...db.de>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andy Shevchenko <andy@...nel.org>,
Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH v2 05/11] x86: add CONFIG_X86_64_NATIVE option
On Tue, Dec 10, 2024 at 03:49:39PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> As a replacement for the obsole MK8/MPSC/MCORE2 configuration options,
> allow building a specialized kernel for the local CPU, which is useful
> for users building their own kernels, and does not require maintaining
> a list of possible CPU options.
>
> Between -march=native and -mtune=native, I pick the former in order
> to give the best performance through the use of extra instructions,
> but at the cost of not being able to run on older CPUs at all. This
> creates a small risk of running into illegal instruction faults when
> the resulting binary ends up being run on a machine other than the
> one it was built on.
Setting this option makes the kernel build non-reproducible (as it'll
build differently on different systems).
I personally think this is a little questionable, as opposed to having
well-defined optimization levels that are tested and supported and
selecting one of those with a `make nativeconfig`. But if this does get
added:
- Could you please document in
Documentation/kbuild/reproducible-builds.rst that this option should
not be set if you want reproducible builds?
- Could you add something similar to the config options LTO uses, to
make `allyesconfig` and `allmodconfig` turn this back *off*?
Powered by blists - more mailing lists