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

Chris Meadors
2003-09-15T13:49:18Z

On Mon, 2003-09-15 at 08:38, Nick Piggin wrote:

> OK, the reason why I don't like the sound of this is because the size
> of your option set has now been squared, and its no longer "make these
> CPUs work".

The way I see the config option working is, having a sub-menu that says
something like, "Select the CPU the kernel will be run on." From there
you can pick one CPU. This sets the in kernel optimizations for that
CPU, along with the work arounds (obviously). It also sets the compiler
flags for the padding, and "-march=[CPU]". Then in a sub-menu of this
menu, there is an "Advanced processor selection". The help text would
be something like, "In addition to the primary processor selected above,
also allow this kernel to be booted on the processors selected below.
Selecting this option disables some of the optimizations for the primary
processor." Just turning on that option would change the "-march=" to
"-mcpu=". Then in the menu one could select from any of the CPUs
listed. Each one would enable the work around code to allow the built
kernel to run correctly on a machine with a different CPU.

I see this as sort of like the advanced partition selection, or the
compiled in fonts.

> I can see an argument for cache line size but thats about it. I can't
> think of my optimisations that should be done on one architecture but
> not another.

Don't forget the compiler optimization flags. A kernel built with
"-march" may not run on any other CPUs.

--
Chris