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

Martin Schlemmer
2003-09-12T19:15:21Z

On Fri, 2003-09-12 at 20:28, Andi Kleen wrote:
> On Fri, 12 Sep 2003 20:22:16 +0200
> Adrian Bunk <bunk@fs.tum.de> wrote:
>
>
> >
> > But even CONFIG_X86_GENERIC doesn't do what you expect. A kernel
> > compiled for Athlon wouldn't run on a Pentium 4 even with
> > CONFIG_X86_GENERIC.
>
> It does. Just try it.
>
> >
> > Quoting arch/i386/Kconfig in -test5:
> >
> > <-- snip -->
> >
> > config X86_USE_3DNOW
> > bool
> > depends on MCYRIXIII || MK7
> > default y
>
> That's obsolete and could be removed. All 3dnow! code is dynamically patched depending on the CPUID.
>

Ok, so how many instructions was added by this ? Or is it
just in the init code ? What else just add 'just another
one or two instructions' to common paths because of this?

Which ever way, the point I and some of the others (besides the
additional one from the embedded guys) want to make, is if I
select the CPU to be Pentium4, it means I want a kernel that is
optimised for my P4, without extra crap that I do not need. Sure,
its an extra instruction here, two there, etc - but when will it
be too much ? Is this not maybe the fabled 'slight slowdown' that
so many people complain about from round the 2.5.[67]'s ?

Ok, so maybe my opinion about X86_GENERIC is not as intended, but
then IMHO, it should be 'fixed'. I could not care less if my kernel
only boot just on my box, never mind on another P4 - I just want
the most optimised on possible. Sure, some guys want a more generic
kernel - get X86_GENERIC to work for them. Same for distro's.

I have long wondered if everything in arch/i386/kernel/cpu/ is
really linked in (meaning with no #ifdef as it now looks to be
at a quick peek), or if it was just easier to link them all,
but have non generic stuff (amd/cyrix/whatever specific code)
filtered by ifdef's.

This is just me, but why then don't we then just drop the specific
arch selection, and just have generics instead of pulling a sock
over the user's eyes ?

Thanks,

--
Martin Schlemmer