Re: [Lug-Nuts] compile otpimization

From: Scott Tyson (tysons@deepwell.com)
Date: Fri Oct 22 1999 - 12:12:25 PDT


And what that does is adds one of these statements onto the compile
that is used on the make bzImage and make modules command:

ifdef CONFIG_M386
CFLAGS := $(CFLAGS) -m386 -DCPU=386
endif

ifdef CONFIG_M486
CFLAGS := $(CFLAGS) -m486 -DCPU=486
endif

ifdef CONFIG_M586
CFLAGS := $(CFLAGS) -m486 -malign-loops=2 -malign-jumps=2
-malign-functions=2 -DCPU=586
endif

ifdef CONFIG_M586TSC
CFLAGS := $(CFLAGS) -m486 -malign-loops=2 -malign-jumps=2
-malign-functions=2 -DCPU=586
endif

ifdef CONFIG_M686
CFLAGS := $(CFLAGS) -mpentiumpro -malign-loops=2 -malign-jumps=2
-malign-functions=2 -DCPU=686
endif

This is right out of the /usr/src/linux/arch/i386/Makefile. It is here
that you would cahnge -m486 to -mpentiumpro (as you cans ee in the last
ifdef statement I have done that already.)

You can add the -march option here as well but I have a feeling to use
that effectively/stable you'd have to recompile all software with that
switch.

*********** REPLY SEPARATOR ***********

On 10/22/99 at 5:21 PM Brian Lavender scribbled:

>Uh, it's the second option under
>
>make menuconfig
>
>Processor type and features --->
>
>I compile mine for 586.
>
>brian
>
>On Fri, Oct 22, 1999 at 04:52:57PM -0700, Scott Tyson wrote:
>> Does anyone out there optimize their kernel compile for a specific
Chip
>> I.E. Pentium, PentiumPro, PII etc? IF you have I'd be curious as to
how
>> you did this. I've played with the
/usr/src/linux/arch/i386/Makefile
>> and changed the -m486 to -mpentiumpro for my dual PII400 box and I
also
>> tried the -march=686. The march option created some problems most
>> notably Quake2 didn't want to run for more than 20 minutes at a
stretch.
>> A big deal when that is the reason for the server being in
existence. .
>> I guess not having any instructions compatible with the 386 is a bad
>> thing (the -march option dictates what chipset to create
instructions
>> for and the -m option deals with instruction scheduling from what I
>> know). Now if I had the source I could re-compile it with the same
>> optimizations :) The -pentiumpro option seems to help a bit from
what I
>> can gather, maybe a few % in CPU cycles showing in top on large CPU
>> consuming processes but I'm not sure. Anyone else played with this?
>>
>> Scott
>
>--
>Brian Lavender
>http://www.brie.com/brian/

Scott Tyson
Deepwell Gaming Server admin
tysons@deepwell.com ICQ#: 125581
http://rand.deepwell.com/



This archive was generated by hypermail 2b29 : Fri Feb 25 2000 - 14:29:07 PST