Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
compile with march=k8 without upgrade to 64bit gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
/carlito
Guru
Guru


Joined: 31 Dec 2004
Posts: 451
Location: Belgium

PostPosted: Wed May 17, 2006 9:21 am    Post subject: compile with march=k8 without upgrade to 64bit gentoo Reply with quote

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
View user's profile Send private message
/carlito
Guru
Guru


Joined: 31 Dec 2004
Posts: 451
Location: Belgium

PostPosted: Wed May 17, 2006 10:24 am    Post subject: Reply with quote

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
View user's profile Send private message
/carlito
Guru
Guru


Joined: 31 Dec 2004
Posts: 451
Location: Belgium

PostPosted: Thu May 18, 2006 5:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
vmboy
n00b
n00b


Joined: 20 Oct 2004
Posts: 9

PostPosted: Thu Jul 20, 2006 4:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
/carlito
Guru
Guru


Joined: 31 Dec 2004
Posts: 451
Location: Belgium

PostPosted: Fri Jul 21, 2006 9:55 am    Post subject: Reply with quote

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
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 3003
Location: Bay Area, CA

PostPosted: Fri Jul 21, 2006 7:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
/carlito
Guru
Guru


Joined: 31 Dec 2004
Posts: 451
Location: Belgium

PostPosted: Sat Jul 22, 2006 7:05 am    Post subject: Reply with quote

That was my first thought to, but it seems to be the CHOST that determines wether you compile for 32 of 64 bit...
http://gentoo-wiki.com/Safe_Cflags#Athlon_64_X2_.28AMD.29
_________________

.O.
..O
OOO
Back to top
View user's profile Send private message
Monkeh
Veteran
Veteran


Joined: 06 Aug 2005
Posts: 1656
Location: England

PostPosted: Sat Jul 22, 2006 10:59 am    Post subject: Reply with quote

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
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 3003
Location: Bay Area, CA

PostPosted: Sat Jul 22, 2006 4:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 3003
Location: Bay Area, CA

PostPosted: Sat Jul 22, 2006 4:52 pm    Post subject: Reply with quote

/carlito wrote:
That was my first thought to, but it seems to be the CHOST that determines wether you compile for 32 of 64 bit...
http://gentoo-wiki.com/Safe_Cflags#Athlon_64_X2_.28AMD.29
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
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 3003
Location: Bay Area, CA

PostPosted: Sat Jul 22, 2006 6:53 pm    Post subject: Reply with quote

devsk wrote:
/carlito wrote:
That was my first thought to, but it seems to be the CHOST that determines wether you compile for 32 of 64 bit...
http://gentoo-wiki.com/Safe_Cflags#Athlon_64_X2_.28AMD.29
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
View user's profile Send private message
Monkeh
Veteran
Veteran


Joined: 06 Aug 2005
Posts: 1656
Location: England

PostPosted: Sun Jul 23, 2006 2:32 am    Post subject: Reply with quote

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
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 3003
Location: Bay Area, CA

PostPosted: Sun Jul 23, 2006 3:30 am    Post subject: Reply with quote

yeah, realised that I was fogetting about CHOST completely.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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