Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Prescott Optimizations
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
jwever
n00b
n00b


Joined: 12 Sep 2003
Posts: 72

PostPosted: Thu May 06, 2004 2:35 am    Post subject: Prescott Optimizations Reply with quote

I just upgraded my P4 1.5 to a P4 3.0E (Prescott with 1MB cache). Besides including smp support in my kernel compile, and changing my MAKEOPTS to -j3 instead of -j2 in my make.conf.... are there any other optimizations I need to make before doing a emerge -eD world?

Thanks.
Back to top
View user's profile Send private message
irf2003
Veteran
Veteran


Joined: 10 Sep 2003
Posts: 1078

PostPosted: Thu May 06, 2004 5:14 pm    Post subject: Re: Prescott Optimizations Reply with quote

jwever wrote:
I just upgraded my P4 1.5 to a P4 3.0E (Prescott with 1MB cache). Besides including smp support in my kernel compile, and changing my MAKEOPTS to -j3 instead of -j2 in my make.conf.... are there any other optimizations I need to make before doing a emerge -eD world?

Thanks.

Code:

-march=prescott

been looking forward to check it out, but, don't have a
prescott yet
get a decent compiler first say the latest gcc-3.3.3
or preferably gcc-3.4.0
and do keep us posted on how things go
hth
PS and while you are at it, umask the 2.6.x linux headers,
and add "nptl" to your USE flags, this is not prescott related,
but since you are emerging -e world you might as well
go all the way
hope you have a good heatsink ,fan, and a clean power
supply, as the prescotts run very hot and are power hungry
Back to top
View user's profile Send private message
jwever
n00b
n00b


Joined: 12 Sep 2003
Posts: 72

PostPosted: Thu May 06, 2004 7:56 pm    Post subject: Reply with quote

I compiled gcc 3.4.0-r1 and then changed my CFLAGS in /etc/make.conf from...
Code:

CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"

to...
Code:

CFLAGS="-march=prescott -O3 -pipe -fomit-frame-pointer"


Just as a test I tried to compile gkrellm (sensors program) and got the following error...
main.c:1: error: bad value (prescott) for -march= switch

Looks like gcc doesn't like the "-march=prescott" cflag. Is there any further documentation on this?

Here is my gcc info...
Code:

gcc -v
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.0/specs
Configured with: /var/tmp/portage/gcc-3.4.0-r1/work/gcc-3.4.0/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.0/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++ --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.0/include/g++-v3 --with-local-prefix=/usr/local --disable-werror --enable-shared --enable-nls --without-included-gettext --disable-multilib --disable-libunwind-exceptions --enable-__cxa_atexit --enable-clocale=generic
Thread model: posix
gcc version 3.4.0  (Gentoo Linux 3.4.0-r1, pie-8.5.3)
Back to top
View user's profile Send private message
spb
Retired Dev
Retired Dev


Joined: 02 Jan 2004
Posts: 2135
Location: Cambridge, UK

PostPosted: Thu May 06, 2004 9:04 pm    Post subject: Reply with quote

AFAICT, -march=prescott is in the current development branch of GCC, but not in 3.4.0. Compare the development branch docs with the 3.4.0 docs on the topic.
Back to top
View user's profile Send private message
irf2003
Veteran
Veteran


Joined: 10 Sep 2003
Posts: 1078

PostPosted: Fri May 07, 2004 1:39 pm    Post subject: Reply with quote

there is a pni cflag somewhere, do man gcc
hth
Back to top
View user's profile Send private message
jwever
n00b
n00b


Joined: 12 Sep 2003
Posts: 72

PostPosted: Fri May 07, 2004 7:14 pm    Post subject: Reply with quote

Yeah, you are correct irf2003.

Code:

The following built-in functions are available when -mpni is used. All of them generate the machine instruction that is part of the name.

v2df __builtin_ia32_addsubpd (v2df, v2df)
v2df __builtin_ia32_addsubps (v2df, v2df)
v2df __builtin_ia32_haddpd (v2df, v2df)
v2df __builtin_ia32_haddps (v2df, v2df)
v2df __builtin_ia32_hsubpd (v2df, v2df)
v2df __builtin_ia32_hsubps (v2df, v2df)
v16qi __builtin_ia32_lddqu (char const *)
void __builtin_ia32_monitor (void *, unsigned int, unsigned int)
v2df __builtin_ia32_movddup (v2df)
v4sf __builtin_ia32_movshdup (v4sf)
v4sf __builtin_ia32_movsldup (v4sf)
void __builtin_ia32_mwait (unsigned int, unsigned int)

The following built-in functions are available when -mpni is used.

v2df __builtin_ia32_loadddup (double const *)
Generates the movddup machine instruction as a load from memory.


I added -mpni to take advantage of the 13 new instructions provided in the Prescott.
Back to top
View user's profile Send private message
irf2003
Veteran
Veteran


Joined: 10 Sep 2003
Posts: 1078

PostPosted: Sun May 09, 2004 2:23 pm    Post subject: Reply with quote

jwever wrote:
Yeah, you are correct irf2003.

Code:

The following built-in functions are available when -mpni is used. All of them generate the machine instruction that is part of the name.

v2df __builtin_ia32_addsubpd (v2df, v2df)
v2df __builtin_ia32_addsubps (v2df, v2df)
v2df __builtin_ia32_haddpd (v2df, v2df)
v2df __builtin_ia32_haddps (v2df, v2df)
v2df __builtin_ia32_hsubpd (v2df, v2df)
v2df __builtin_ia32_hsubps (v2df, v2df)
v16qi __builtin_ia32_lddqu (char const *)
void __builtin_ia32_monitor (void *, unsigned int, unsigned int)
v2df __builtin_ia32_movddup (v2df)
v4sf __builtin_ia32_movshdup (v4sf)
v4sf __builtin_ia32_movsldup (v4sf)
void __builtin_ia32_mwait (unsigned int, unsigned int)

The following built-in functions are available when -mpni is used.

v2df __builtin_ia32_loadddup (double const *)
Generates the movddup machine instruction as a load from memory.


I added -mpni to take advantage of the 13 new instructions provided in the Prescott.

i think -mpni is now depricated you can use -msse3 instead.
now any performance gains with -mpni enabled?
also what compiler are you using?
TIA
Back to top
View user's profile Send private message
lbrtuk
l33t
l33t


Joined: 08 May 2003
Posts: 910

PostPosted: Sun May 09, 2004 4:18 pm    Post subject: Reply with quote

I think you're mislead if you think this is going to speed your machine up automagically. While the the new gcc has support for the instructions, I don't think it optimises using these instructions. That is to say - the programmer has to explicitly write the program using these instructions for them to be used. And I doubt any programmers have got round to putting prescott instructions into their programs yet.

It is the same as with sse/sse2/3dnow/3dnow2/altivec: gcc does not do autovectorisation yet. A normally written plain c file will not get any of these instructions put in. AFAIK.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum