AMD64 I386 or X64 load?

James Gray james at grayonline.id.au
Mon Mar 27 01:01:22 UTC 2006


On Mon, 27 Mar 2006 11:10 am, stan wrote:
> On Mon, Mar 27, 2006 at 10:35:11AM +1100, James Gray wrote:
> > On Mon, 27 Mar 2006 10:18 am, stan wrote:
> > > I just discovered that I grabbed the wrong set of CD's yesterday and
> > > loaded the I386 set on my dual processor, dual core Opteron machine
> > > (Sun Ultra 40).
> > >
> > > I then downloaded the latest 2.16 kernel and built a custom kernel for
> > > this machine, setting the processor type correctly in the kernel
> > > config.
> > >
> > > How much performance penalty should I expect, if I don't reload the
> > > correct binaries?
> >
> > Pretty significant considering an AMD64 kernel wont grok 32bit libs. 
> > IOW, it probably wont boot.  Install the 64bit kernel and libs and you'll
> > be all set.
>
> Mmm, something's not quite right here.
>
> I _mistakenly_ loaded from the I386 CD's, and before I noticed it, I
> downloaded the 2.16 kernel sources, and built a kerne specifying the
> correct procesor. Hmm, maybe it's a 32 bit kernel now that I think about
> it.
>
> How can I tell?

Compile this:

---- bit-check.cpp ----

#include <iostream>

int main(void){
        std::cout << "Looks like this is a "
                  << sizeof(int)*8 << "bit system" << std::endl;
        return 0;
}

---- bit-check.cpp ----

(ie, "g++ bit-check.cpp -o bit-check")
then run "./bit-check".

64bit kernels use 64bit integers, and 32bit kernels use 32bit integers.  
Assumption is that there are 8bits/byte which isn't necessarily correct on 
all architectures, but should work on AMD64/IA32.

Cheers,

James
-- 
Kirk to Enterprise -- beam down yeoman Rand and a six-pack.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060327/0493412c/attachment.sig>


More information about the ubuntu-users mailing list