Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on AMD64
  • Search

core 2 duo 32bit

Have an x86-64 problem? Post here.
Locked
Advanced search
22 posts • Page 1 of 1
Author
Message
Dio-Sama
n00b
n00b
User avatar
Posts: 19
Joined: Fri Mar 18, 2005 9:41 am

core 2 duo 32bit

  • Quote

Post by Dio-Sama » Sat Aug 05, 2006 3:57 pm

hello,

i'm sorry, i think this is a question already asked some time ago for amd64, but i couldn't find the specific post, so i'm asking here (again). i did a couple of 32bit gentoo installs already, but with this 64bit thing i'm at a loss. i read that if i'm using the system mainly for media-related stuff like mplayer i'm better off with a 32bit install, but isn't there some way of utilising the prowess of the c2d (like more registers or whatnot) and staying 32bit? like cflagging -march=nocona (if this is even the right march for c2d) and adding -m32 in make.conf? :roll:

cheers,
dio.
"Death is but perchance to dream."
Top
dweigert
Guru
Guru
User avatar
Posts: 369
Joined: Fri Oct 04, 2002 10:49 pm
Location: Somerset, NJ USA

  • Quote

Post by dweigert » Sat Aug 05, 2006 5:04 pm

No, That won't buy you what you want. The architecture of the chip is such that the extra registers (which are 64 bit) are only visible when the chip is in 64 bit mode. This applies for both AMD and Intel 64 bit x86 chips.

Dan
"Always remember to mount a scratch monkey..."
Top
Dio-Sama
n00b
n00b
User avatar
Posts: 19
Joined: Fri Mar 18, 2005 9:41 am

  • Quote

Post by Dio-Sama » Sat Aug 05, 2006 10:15 pm

hmh, so i guess it's 32bit without any of those neat extra registers for me. but i wonder what march i should use for the c2d? or would there be any benefit from using icc? i googled a bit, but found nothing consistent~ :(

thx alot,
dio.
"Death is but perchance to dream."
Top
Empire
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 94
Joined: Wed Aug 06, 2003 12:22 pm
Location: Europe / Switzerland

  • Quote

Post by Empire » Sun Aug 06, 2006 4:42 pm

Everything that works in 32Bit works in 64Bit as well...

There's no real benefit in using ICC instead of GCC, but you can still find a howto in the Gentoo Wiki.
One of the great mistakes is to judge policies and
programs by their intentions rather than their results.
Milton Friedman
Top
Dio-Sama
n00b
n00b
User avatar
Posts: 19
Joined: Fri Mar 18, 2005 9:41 am

  • Quote

Post by Dio-Sama » Mon Aug 07, 2006 9:17 am

ok, i read up on that icc wiki, but there's not really more information about what i want to know. i posted here a related question, but doing so in a [SOLVED] thread was a stupid idea after all it seems. :)
but what i asked there is what really confuses me. and there's a little something about using core 2 duo with icc too. am i just not seeing the forest for the trees, or is there really no way of optimising for c2d on gcc/icc atm?
"Death is but perchance to dream."
Top
NewBlackDak
Guru
Guru
User avatar
Posts: 512
Joined: Sun Nov 02, 2003 8:24 pm
Location: Utah County, UT

  • Quote

Post by NewBlackDak » Mon Aug 07, 2006 5:02 pm

You can run a 64-bit kernel and 32-bit userland without any issues.
Gentoo systems.
X2 4200+@2.6 - Athy
X2 3600+ - Myth
UltraSparc5 440 - sparcy
Top
Dio-Sama
n00b
n00b
User avatar
Posts: 19
Joined: Fri Mar 18, 2005 9:41 am

  • Quote

Post by Dio-Sama » Mon Aug 07, 2006 6:44 pm

NewBlackDak wrote:You can run a 64-bit kernel and 32-bit userland without any issues.
ok thx, that's good to know. i guess that's what i wanted. sorry if i'm repeating myself, but that would mean that only the kernel is running 64bit, fully utilising the c2d, registerwise and whatnot. and the whole rest of the system is 32bit, for i don't want to bother with a changeroot. buuuut. how would i do that? installing with an amd64 boot cd and putting -m32 in make.conf b4 beginning with the emerge? i get the feeling that's wrong somehow... :?
"Death is but perchance to dream."
Top
Dio-Sama
n00b
n00b
User avatar
Posts: 19
Joined: Fri Mar 18, 2005 9:41 am

  • Quote

Post by Dio-Sama » Tue Aug 08, 2006 1:45 pm

ok, i searched a bit on the forums found something interesting. NewBlackDak, you said i could run a 64bit kernel with a 32bit userland with no problems, would that be right if i set chost to i686 instead of x86_64 and -march to nocona? or would that result in a complete 32bit install?

thx,
Dio.

btw, is there no one who could explain to me exactly why i should put -march=nocona in make.conf for a core 2 duo, wich is a completely different chip (at the very least in terms of pipeline lenght and additional functionality...)
"Death is but perchance to dream."
Top
fangorn
Veteran
Veteran
User avatar
Posts: 1886
Joined: Sat Jul 31, 2004 1:31 pm
Contact:
Contact fangorn
Website

  • Quote

Post by fangorn » Tue Aug 08, 2006 2:00 pm

As I understood it, this would lead to a 32bit system (i686) with all available optimizations for nocona cores (if any). For the kernel to be 64bit you need to set at least in the kernel config the type to a 64bit processor type ("make menuconfig ARCH=x86_64" IIRC). I dont know if you will need a 64bit GCC to achieve this (boot with the 64bit live cd and chroot or something like that)
Video Encoding scripts collection | Project page
Top
torne
n00b
n00b
Posts: 65
Joined: Thu Jan 22, 2004 4:24 pm
Location: Cambridge, UK

  • Quote

Post by torne » Tue Aug 08, 2006 4:29 pm

There is little/no advantage to running a 64-bit kernel with a 32-bit userland unless you have more than 4GB of physical memory; a normal desktop machine just doesn't spend enough time CPU-bound in the kernel for it to make a difference.

GCC has no specific optimisations for the Core line of processors at this point, even in x86_64, as far as I can see. You may get slight performance benefits from using x86_64 due to the accessibility of the extra registers for the compiler, but you don't get any Core specific benefits from that, just the parts that are common to all x86_64 chips, Intel or AMD.

Note that even when running in 32-bit mode the extra registers present on the silicon are still used, even though the compiler can't generate code that accesses them: they become part of the register renaming buffer. Any modern x86 chip, 32 bit or 64 bit has more registers physically on the silicon than are accessible by the compiler - the register names don't always correspond to the same physical register as they did at an earlier time, as this is all optimised by the out-of-order execution hardware at runtime. This effect can be used to a larger degree on chips capable of running 64-bit code, as they will contain more registers to begin with, and this is doable even if the code running is 32-bit.

I have been told, though I have no idea if this is true, that there are at least 28 fully 64-bit general purpose registers on an Athlon64 die. The x86_64 architecture only exposes 16 of them. :)

I'd just use x86, though I have no idea which -march is likely to be the best for the Core chips.
Top
Dio-Sama
n00b
n00b
User avatar
Posts: 19
Joined: Fri Mar 18, 2005 9:41 am

  • Quote

Post by Dio-Sama » Tue Aug 08, 2006 8:54 pm

Ok, thanks for clearing things up for me! :wink:
Now, since my machine only has 2GB of physical memory is guess it would be pointless to go with a 64bit kernel and a 32bit userland. And for that little compiler optimisation problem, after some googling around i found this article, wich suggested that at least for the newest icc there is a core 2 duo specific optimisation flag: -QxT. Even though i found nothing similar for gcc, the site i linked suggested that the next best thing would be a -march=prescott for 32bit after all, because that flag isn't optimising for that specific architecture, but for gimmicks it has, like sse3 (now i wonder if there is, or will be, not a new setting for core 2 duo, but maybe just a flag like -msse4). i found it quite useful to clear up my problems with understanding this optimisation issue. :roll:

Edit: Before i forget this, is this ldflags thingie, in other words the linker, something compiler specific? Or would i be able to use LDFLAGS="blah" with icc?!
"Death is but perchance to dream."
Top
thedude0001
Arch/Herd Tester
Arch/Herd Tester
User avatar
Posts: 69
Joined: Sun Jan 16, 2005 4:12 pm

  • Quote

Post by thedude0001 » Thu Aug 10, 2006 7:31 am

NewBlackDak wrote:You can run a 64-bit kernel and 32-bit userland without any issues.
Not on current Gentoo/amd64. There is a highly experimental profile for that which doesn't work at all right now and not much work is being done there. This looks different on other arches (sparc and mips as far as I know), but on amd64 it's either full 32 bit or full 64 bit (with multilib that gives you the possibility to run 32 bit apps).

If you want to go 32bit (a x86 install) then you do have the option to use -march=nocona in your CFLAGS / CXXFLAGS on current gcc versions. This will work just fine and produce 32bit binaries that are optimized for your CPU. If you decide to go 64bit: there aren't that many problems as some posts might suggest. Media players play nearly everything just fine natively with the exception of videos needing win32codecs. If you need those you can install mplayer-bin alongside the normal mplayer and it will work just fine. Same for Firefox & flash.
Das Schlimme auf dieser Welt ist
daß die Dummen so selbstsicher sind
und die Gescheiten so voller Zweifel.
Top
Dio-Sama
n00b
n00b
User avatar
Posts: 19
Joined: Fri Mar 18, 2005 9:41 am

  • Quote

Post by Dio-Sama » Thu Aug 10, 2006 2:53 pm

I wasn't really thinking about Flash+Firefox, i was worried that there might be problems with x264-svn/xvid, or the playback of ogm or mkv container files, or playback of hd-x264 files, since they would need quite a lot of juice. And i was wondering if this neat little x264-acceleration is working fine in 64bit, but that just as a sidenote. Maybe i'm just too cautious. :roll:
"Death is but perchance to dream."
Top
Emopig
Apprentice
Apprentice
User avatar
Posts: 188
Joined: Wed Mar 15, 2006 2:21 pm

  • Quote

Post by Emopig » Thu Aug 10, 2006 5:29 pm

I don't think either ATI or nVidia H.264/AVC acceleration works on Linux, but the software implementations of H.264/AVC and the media players on Linux tend to produce lower CPU utilisation to get the job done than Windows software anyway.
2.6.35 / Gnome 2.30
Athlon64 3500+ / 1.5 GB / Asus A8N VM CSM
Top
yngwin
Retired Dev
Retired Dev
User avatar
Posts: 4572
Joined: Thu Dec 19, 2002 1:22 pm
Location: Suzhou, China

  • Quote

Post by yngwin » Thu Aug 10, 2006 8:33 pm

Dio-Sama wrote:i was worried that there might be problems with x264-svn/xvid, or the playback of ogm or mkv container files, or playback of hd-x264 files,
As those are all open source, there is absolutely no problem playing and encoding them on a 64-bit system. Now that I have an AMD Athlon 64 X2 system, it's finally worth the trouble to do x264 encoding (for which I prefer a mkv container).
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Top
thedude0001
Arch/Herd Tester
Arch/Herd Tester
User avatar
Posts: 69
Joined: Sun Jan 16, 2005 4:12 pm

  • Quote

Post by thedude0001 » Fri Aug 11, 2006 2:12 pm

No personal experience with Xvid, but encoding with x264-svn works fine on amd64, same for any playback. Haven't encountered any problems at all in that area :)
Das Schlimme auf dieser Welt ist
daß die Dummen so selbstsicher sind
und die Gescheiten so voller Zweifel.
Top
Dio-Sama
n00b
n00b
User avatar
Posts: 19
Joined: Fri Mar 18, 2005 9:41 am

  • Quote

Post by Dio-Sama » Fri Aug 11, 2006 4:01 pm

I think all this sounds convincing enough for me to go for x86_64, i mean the worst that could happen is that it all goes wrong, right? :D
Wich i don't expect to happen, heh. And for problems like "Nooooo! My Firefox Flash plugin doesn't work in 64bit! Now i can't watch people making an a** out of themselfes on youtube anymore!" and the likes we have the forums, right? Or one could just use this site and be happy.
[snip] but encoding with x264-svn works fine on amd64, same for any playback. Haven't encountered any problems at all in that area
Does that include hdtv videos? That would be interesting for me to know (like what cpu usage when playing x264 video material).
[snip] Now that I have an AMD Athlon 64 X2 system, it's finally worth the trouble to do x264 encoding (for which I prefer a mkv container).
Yup, i prefer mkv too, but you make it sound like x264 is multithreaded and is able to use more than one core/cpu when on playback... or is it?
"Death is but perchance to dream."
Top
thedude0001
Arch/Herd Tester
Arch/Herd Tester
User avatar
Posts: 69
Joined: Sun Jan 16, 2005 4:12 pm

  • Quote

Post by thedude0001 » Fri Aug 11, 2006 9:43 pm

I can't help you with HDTV videos, sorry. But if they work on x86 they should work on amd64 as well.

x264 is indeed multithreaded, so it can make use of multiple cores / CPUs during encoding. From what I understand from the mplayer/mencoder manpage decoding of h264 material can also be multithreaded if the source was encoded with multithreading enabled and the decoder supports this (which lavc currently does NOT)...
Das Schlimme auf dieser Welt ist
daß die Dummen so selbstsicher sind
und die Gescheiten so voller Zweifel.
Top
yngwin
Retired Dev
Retired Dev
User avatar
Posts: 4572
Joined: Thu Dec 19, 2002 1:22 pm
Location: Suzhou, China

  • Quote

Post by yngwin » Fri Aug 11, 2006 11:04 pm

Dio-Sama wrote:
[snip] but encoding with x264-svn works fine on amd64, same for any playback. Haven't encountered any problems at all in that area
Does that include hdtv videos? That would be interesting for me to know (like what cpu usage when playing x264 video material).
Yes it does. I have some 720p stuff that plays back with up to 25% on the one core and up to 10% on the other.
Dio-Sama wrote:
[snip] Now that I have an AMD Athlon 64 X2 system, it's finally worth the trouble to do x264 encoding (for which I prefer a mkv container).
Yup, i prefer mkv too, but you make it sound like x264 is multithreaded and is able to use more than one core/cpu when on playback... or is it?
I was talking about encoding, which most definitely is multithreaded, using both cores. But playing back also uses both cores, although I can't be sure that one is used for video decoding and the other for audio or some other way.
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Top
Dio-Sama
n00b
n00b
User avatar
Posts: 19
Joined: Fri Mar 18, 2005 9:41 am

  • Quote

Post by Dio-Sama » Sat Aug 12, 2006 5:46 pm

thedude0001 wrote:x264 is indeed multithreaded, so it can make use of multiple cores / CPUs during encoding. From what I understand from the mplayer/mencoder manpage decoding of h264 material can also be multithreaded if the source was encoded with multithreading enabled and the decoder supports this (which lavc currently does NOT)...
Oh well, and even if it isn't using both cores i think the processor should be up to it, multithreaded encoding sure _is_ helpful enough me thinks.. :P
Wich leads me to...
yngwin wrote:I was talking about encoding, which most definitely is multithreaded
...i'm sorry that i read over that, must have been wishful thinking on my side. :wink:
"Death is but perchance to dream."
Top
thedude0001
Arch/Herd Tester
Arch/Herd Tester
User avatar
Posts: 69
Joined: Sun Jan 16, 2005 4:12 pm

  • Quote

Post by thedude0001 » Sat Aug 12, 2006 9:04 pm

Well, the specs of h264 do allow multithreaded decoding (again if the source was encoded with multiple threads). It's just that no decoders I know of have implemented this ;)
Das Schlimme auf dieser Welt ist
daß die Dummen so selbstsicher sind
und die Gescheiten so voller Zweifel.
Top
Dio-Sama
n00b
n00b
User avatar
Posts: 19
Joined: Fri Mar 18, 2005 9:41 am

  • Quote

Post by Dio-Sama » Sun Aug 13, 2006 9:49 am

thedude0001 wrote:Well, the specs of h264 do allow multithreaded decoding (again if the source was encoded with multiple threads). It's just that no decoders I know of have implemented this ;)
Yeah, it's not like h264 decoding is putting much strain on the cpu. It absolutely wouldn't benefit from being able to use 2 or more processors/cores. *cough*
I mean i can imagine that using threads makes programming more difficult, but why not going all the way, since the codec supports it? But i'm no one to complain since i'm not contributing, i'm just a user (hoping this will be implemented). 8)
"Death is but perchance to dream."
Top
Locked

22 posts • Page 1 of 1

Return to “Gentoo on AMD64”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic