Re: FEATURE REQUEST: Specific Processor Optimizations on x86 Architecture
From: Nick Piggin
Date: Thu Oct 23 2003 - 18:24:56 EST
J.A. Magallon wrote:
On 10.22, Joseph D. Wagner wrote:
Yes, I know you can select Pentium III, Pentium 4, Athlon, etc, under
processor type when doing a 'make xconfig', but those selections do not
translate into the appropriate -mcpu and -march flags.
While the kernel on x86 architecture can be optimized in terms of generic
processor specifications (i.e. i386, i486, i586, i686), the kernel can't be
optimized beyond a i686.
If you select Pentium III, the -march flag is set to i686.
If you select Pentium 4, the -march flag is set to i686.
If you select Athlon 4, the -march flag is set to i686.
If you select Athlon XP, the -march flag is set to i686.
It should be that...
If you select Pentium III, the -march flag is set to pentium3.
If you select Pentium 4, the -march flag is set to pentium4.
If you select Athlon 4, the -march flag is set to athlon-4.
If you select Athlon XP, the -march flag is set to athlon-xp.
I don't want to have to hand edit the makefiles just to optimize my kernel.
I think this change is simple enough to do, and would allow kernel
developers the option of processor-specific optimizations in the future.
TIA.
Joseph D. Wagner
I have sent the attached patches sometimes to the list/Marcelo, and they
have been rejected to the moment because:
- gcc can spit some new instructions, reorganize code and other things when
you jump from i686 to pentium3, for example.
- There can be bugs both in gcc and in the kernel that can be triggered by
>i686 optimizations/code.
- This is not safe for a stable kernel, it was done in 2.5, bugs appeared,
were corrected, and so on, 'cause this was a development kernel.
Not that I think this should go in anyway, but the only way you ever
might get it in is if you measure significant performance improvements.
I don't think you will.
-
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/