View previous topic :: View next topic |
Author |
Message |
/carlito Guru
Joined: 31 Dec 2004 Posts: 451 Location: Belgium
|
Posted: Wed May 17, 2006 9:21 am Post subject: compile with march=k8 without upgrade to 64bit gentoo |
|
|
At the moment i run 2 Athlon64 systems in 32bit.
Code: | ° Desktop : Athlon 64 3000+ -O3 march=athlon-xp -pipe i686-pc-linux-gnu
° Notebook : Turion MT30 -02 march=i686 -pipe i686-pc-linux-gnu |
I choose NOT to upgrade to 64bit atm for driver support and maximum compatibility (=minimum headaches )
Stability is my prime concern as these are production machines.
The desktop system is my primary rig and gets used for gaming, multimedia purposes (freevo, quodlibet) and as a home file server. This rig runs 24/7.
The notebook is used for work and multimedia purposes (dvd, quodlibet).
You can clearly see that my apps aren't optimized for the Athlon64 chip at all. Would I be able to change my march to k8 for
full optimalization of my cpu without upgrading to 64 bit? Also, if it where possible to achieve this, would i benefit from the performance gains?
If so, how would i go about this. I presume I would have to remerge my entire toolchain twice and then remerge all my apps twice.
Code: | $ emerge -e system && emerge -e system
$ emerge -e world emerge -e world |
_________________
.O.
..O
OOO
|
|
Back to top |
|
|
/carlito Guru
Joined: 31 Dec 2004 Posts: 451 Location: Belgium
|
Posted: Wed May 17, 2006 10:24 am Post subject: |
|
|
Ok, so i've created a stage4 of my current system and unpacked it to a new partition.
I chrooted into my new environment ,changed the march from i686 to k8 and am running emerge -e world. I'll keep everyone posted on this.
Any tips, hints, thoughts on this are still appreciated though.
Also, what tools would you recommend to bencmark the performance differences between the two environments? _________________
.O.
..O
OOO
|
|
Back to top |
|
|
/carlito Guru
Joined: 31 Dec 2004 Posts: 451 Location: Belgium
|
Posted: Thu May 18, 2006 5:33 pm Post subject: |
|
|
The emerge -e system ran fine and the system boots fine. I also recompiled my kernel with the new CFLAGS. Don't know if this has any impact though...
Tonight i will let the system recompile world. Is it really needed to perform this step twice? If so, can anyone explain me why?
I'm still looking for tools to benchmark the performance between the two environments. The only tools i can think of are:° Kernel compilation
° Packing and unpacking a bzip2 archive
° Emerging a package
° Boot time
_________________
.O.
..O
OOO
|
|
Back to top |
|
|
vmboy n00b
Joined: 20 Oct 2004 Posts: 9
|
Posted: Thu Jul 20, 2006 4:42 pm Post subject: |
|
|
Hello /carlito,
Are you still having success with your 32-bit build with "-march=k8"?
Did you need to add "-m32" to your CFLAGS?
(This would probably be bad since gcc would optimize for i386 instead of i686).
I'm very curious about your results because I also run 32-bit on my athlon64 systems for the same reasons as you.
Has anyone else tried this? |
|
Back to top |
|
|
/carlito Guru
Joined: 31 Dec 2004 Posts: 451 Location: Belgium
|
Posted: Fri Jul 21, 2006 9:55 am Post subject: |
|
|
Late on i discovered that this compiling with k8 for 32bit is even suggested by the gentoo handbook. So no harm will be done. I just added -msse3 to my cflags.
Speed has improved with the k8 flag though! _________________
.O.
..O
OOO
|
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 3003 Location: Bay Area, CA
|
Posted: Fri Jul 21, 2006 7:36 pm Post subject: |
|
|
Quote: | Late on i discovered that this compiling with k8 for 32bit is even suggested by the gentoo handbook. | can you point to the link. I didn't find it. march=k8 should logically mean 64 bit binary but I will take your word for it... |
|
Back to top |
|
|
/carlito Guru
Joined: 31 Dec 2004 Posts: 451 Location: Belgium
|
|
Back to top |
|
|
Monkeh Veteran
Joined: 06 Aug 2005 Posts: 1656 Location: England
|
Posted: Sat Jul 22, 2006 10:59 am Post subject: |
|
|
devsk wrote: | Quote: | Late on i discovered that this compiling with k8 for 32bit is even suggested by the gentoo handbook. | can you point to the link. I didn't find it. march=k8 should logically mean 64 bit binary but I will take your word for it... |
No, it doesn't. k8's are fully capable of 32-bit mode, and some are even locked to it (Sempron), k8 does not logically mean 64-bit. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 3003 Location: Bay Area, CA
|
Posted: Sat Jul 22, 2006 4:32 pm Post subject: |
|
|
Monkeh wrote: | devsk wrote: | Quote: | Late on i discovered that this compiling with k8 for 32bit is even suggested by the gentoo handbook. | can you point to the link. I didn't find it. march=k8 should logically mean 64 bit binary but I will take your word for it... |
No, it doesn't. k8's are fully capable of 32-bit mode, and some are even locked to it (Sempron), k8 does not logically mean 64-bit. | I know k8's are fully capable of 32-bit mode, I run one in that mode. I meant march=k8 in CFLAGS. Does that produce 32-bit binary by itself? And the answer is 'yes'. I just compiled a dummy file with march=k8 without -m32 and it produces 32 bit binary. I wonder where it found that I wanted a 32-bit binary. May be from same place where uname -a finds i686. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 3003 Location: Bay Area, CA
|
Posted: Sat Jul 22, 2006 4:52 pm Post subject: |
|
|
so, the question is: what does march=k8 get you on top of march=athlon64? I have a feeling the answer is: Nothing. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 3003 Location: Bay Area, CA
|
Posted: Sat Jul 22, 2006 6:53 pm Post subject: |
|
|
devsk wrote: | so, the question is: what does march=k8 get you on top of march=athlon64? I have a feeling the answer is: Nothing. | yup...http://www.gentoo.org/doc/en/gentoo-amd64-faq.xml confirms it. Now I have a feeling that everyone but me knew that one... |
|
Back to top |
|
|
Monkeh Veteran
Joined: 06 Aug 2005 Posts: 1656 Location: England
|
Posted: Sun Jul 23, 2006 2:32 am Post subject: |
|
|
devsk wrote: | Monkeh wrote: | devsk wrote: | Quote: | Late on i discovered that this compiling with k8 for 32bit is even suggested by the gentoo handbook. | can you point to the link. I didn't find it. march=k8 should logically mean 64 bit binary but I will take your word for it... |
No, it doesn't. k8's are fully capable of 32-bit mode, and some are even locked to it (Sempron), k8 does not logically mean 64-bit. | I know k8's are fully capable of 32-bit mode, I run one in that mode. I meant march=k8 in CFLAGS. Does that produce 32-bit binary by itself? And the answer is 'yes'. I just compiled a dummy file with march=k8 without -m32 and it produces 32 bit binary. I wonder where it found that I wanted a 32-bit binary. May be from same place where uname -a finds i686. |
That'd be the kernel, so no. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 3003 Location: Bay Area, CA
|
Posted: Sun Jul 23, 2006 3:30 am Post subject: |
|
|
yeah, realised that I was fogetting about CHOST completely. |
|
Back to top |
|
|
|