Re: [PATCH] 2.6 workaround for Athlon/Opteron prefetch errata

From: John Bradford
Date: Fri Sep 12 2003 - 16:20:47 EST


> From linux-kernel-owner+john=40bradfords.org.uk@xxxxxxxxxxxxxxx Fri Sep 12 21:59:55 2003
> Envelope-To: john@xxxxxxxxxxxxxxxx
> Date: Fri, 12 Sep 2003 22:00:23 +0200
> From: Adrian Bunk <bunk@xxxxxxxxx>
> To: Andi Kleen <ak@xxxxxxx>
> Cc: Martin Schlemmer <azarah@xxxxxxxxxx>, jgarzik@xxxxxxxxx,
> ebiederm@xxxxxxxxxxxx, akpm@xxxxxxxx, richard.brunner@xxxxxxx,
> linux-kernel@xxxxxxxxxxxxxxx, torvalds@xxxxxxxx
> Subject: Re: [PATCH] 2.6 workaround for Athlon/Opteron prefetch errata
> References: <3F60837D.7000209@xxxxxxxxx> <20030911162634.64438c7d.ak@xxxxxxx> <3F6087FC.7090508@xxxxxxxxx> <m1vfrxlxol.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx> <20030912195606.24e73086.ak@xxxxxxx> <3F62098F.9030300@xxxxxxxxx> <20030912182216.GK27368@xxxxxxxxx> <20030912202851.3529e7e7.ak@xxxxxxx> <1063393505.3371.207.camel@xxxxxxxxxxxxxxxxxxxxxx> <20030912213016.47a4e5de.ak@xxxxxxx>
> Mime-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> In-Reply-To: <20030912213016.47a4e5de.ak@xxxxxxx>
> User-Agent: Mutt/1.4.1i
> Sender: linux-kernel-owner@xxxxxxxxxxxxxxx
> Precedence: bulk
> X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
>
> On Fri, Sep 12, 2003 at 09:30:16PM +0200, Andi Kleen wrote:
> >...
> > I think it's useful to keep kernels booting everywhere, it makes it a lot easier
> > to test a single kernel on multiple systems.
>
> Different people have different needs:
>
> Sometimes you want kernels booting everywhere, e.g. a distribution might
> want to support all CPUs from an 386 to an Opteron with one kernel for
> their boot floppies.
>
> For a system administrator with only Pentium 3 and Pentum 4 machines
> support for 386 and Opteron isn't of much worth.
>
> In some embedded systems people are happy about every kB their kernel is
> smaller.

As I understand it:

* For maximum optimisation, compile for your specific CPU.
* To get compatibility for everything except a 386 CPU, with almost
optimum performance, compile for 486.
* To get full compatibility, with possibly significantly less than
optimum performance, compile for 386.
* Only optimise for Pentium if the kernel is intended to be run on a
Pentium CPU, as the resulting code is less optimal for many other
processors than code optimised for a 486.

Recently, there have been efforts to make a universally compatible
kernel, with optimisations for all CPUs that don't significantly
adversely affect any other CPUs. The logic behind this seems to be
that users can then use their distribution's kernel on any CPU, and
get reasonable performance.

Nothing wrong with that in principle, but there are also a lot of
users who are happy to compile one kernel for one machine, and want it
as optimised as possible. This often includes embedded systems
developers, but certainly isn't limited to them.

John.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/