Architecture Nomenclature

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Architecture Nomenclature

Kip Warner
Greetings Everyone,

I've been looking for a while, but no luck. Is there a table somewhere
that summarizes the different architecture names like i386, i586, i686,
amd64, ia64, and so on along with the criteria for hardware qualifying
under that name?

e.g. Does i686 mandate SSE2?

PS I am not on the mailing list, so please remember to cc me. Thanks.

--
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Architecture Nomenclature

Benjamin Drung-3
Am Dienstag, den 27.04.2010, 12:45 -0700 schrieb Kip Warner:
> Greetings Everyone,
>
> I've been looking for a while, but no luck. Is there a table somewhere
> that summarizes the different architecture names like i386, i586, i686,
> amd64, ia64, and so on along with the criteria for hardware qualifying
> under that name?

I am not aware of a table. I would search for the names and see which is
the first architecture and check their features.

> e.g. Does i686 mandate SSE2?

i686 = Pentium Pro and later = only MMX
amd64 mandates SSE2 (and therefore MMX and SSE)

> PS I am not on the mailing list, so please remember to cc me. Thanks.

--
Benjamin Drung
Ubuntu Developer (www.ubuntu.com) | Debian Maintainer (www.debian.org)

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Architecture Nomenclature

Kip Warner
On Tue, 2010-04-27 at 22:16 +0200, Benjamin Drung wrote:

> Am Dienstag, den 27.04.2010, 12:45 -0700 schrieb Kip Warner:
> > Greetings Everyone,
> >
> > I've been looking for a while, but no luck. Is there a table somewhere
> > that summarizes the different architecture names like i386, i586, i686,
> > amd64, ia64, and so on along with the criteria for hardware qualifying
> > under that name?
>
> I am not aware of a table. I would search for the names and see which is
> the first architecture and check their features.
>
> > e.g. Does i686 mandate SSE2?
>
> i686 = Pentium Pro and later = only MMX
> amd64 mandates SSE2 (and therefore MMX and SSE)
>
> > PS I am not on the mailing list, so please remember to cc me. Thanks.
What would you suggest for a package's architecture for a 32-bit
platform that supports SSE2, like the Pentium 4?

--
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Architecture Nomenclature

Ben Hutchings-3
In reply to this post by Kip Warner
On Tue, 2010-04-27 at 12:45 -0700, Kip Warner wrote:
> Greetings Everyone,
>
> I've been looking for a while, but no luck. Is there a table somewhere
> that summarizes the different architecture names like i386, i586, i686,
> amd64, ia64, and so on along with the criteria for hardware qualifying
> under that name?

'i386' covers Intel 486 and compatible processors (originally 386 and
compatible).
'amd64' covers AMD64 and Intel 64 processors.
'ia64' covers Intel Itanium processors.

> e.g. Does i686 mandate SSE2?

Debian doesn't commonly use the architecture names 'i586' or 'i686'.

There are a few packages that are named using the suffix '-686' or
'-i686', and their descriptions explain what this means:

http://packages.debian.org/sid/linux-image-2.6.32-4-686
http://packages.debian.org/sid/libc6-i686

Ben.

--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

signature.asc (845 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Architecture Nomenclature

Ben Hutchings-3
In reply to this post by Kip Warner
On Tue, 2010-04-27 at 13:40 -0700, Kip Warner wrote:

> On Tue, 2010-04-27 at 22:16 +0200, Benjamin Drung wrote:
> > Am Dienstag, den 27.04.2010, 12:45 -0700 schrieb Kip Warner:
> > > Greetings Everyone,
> > >
> > > I've been looking for a while, but no luck. Is there a table somewhere
> > > that summarizes the different architecture names like i386, i586, i686,
> > > amd64, ia64, and so on along with the criteria for hardware qualifying
> > > under that name?
> >
> > I am not aware of a table. I would search for the names and see which is
> > the first architecture and check their features.
> >
> > > e.g. Does i686 mandate SSE2?
> >
> > i686 = Pentium Pro and later = only MMX
> > amd64 mandates SSE2 (and therefore MMX and SSE)
> >
> > > PS I am not on the mailing list, so please remember to cc me. Thanks.
>
> What would you suggest for a package's architecture for a 32-bit
> platform that supports SSE2, like the Pentium 4?
It must be 'i386'.

Ben.

--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

signature.asc (845 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Architecture Nomenclature

Brian M. Carlson
In reply to this post by Kip Warner
On Tue, Apr 27, 2010 at 12:45:30PM -0700, Kip Warner wrote:
> Greetings Everyone,
>
> I've been looking for a while, but no luck. Is there a table somewhere
> that summarizes the different architecture names like i386, i586, i686,
> amd64, ia64, and so on along with the criteria for hardware qualifying
> under that name?

Are you asking about the Debian package architecture or the output of
uname?  Debian does not use i586 and i686 for package architectures, and
i386 really means i486 or above (for reasons I won't get into here).
amd64 machines need to support the lm and nx attributes in
/proc/cpuinfo.  ia64 processors support a different architecture known
as Itanium.

> e.g. Does i686 mandate SSE2?

As far as uname, not all machines that output i686 will support SSE2.
Your assumption should be that i686 == Pentium Pro, with the caveat that
not all i686 machines support cmov (some Via chips do not).  There are
special directories on some (Debian) architectures, such as i386, in
which you can place binaries built for, say, i686.  The linker will
automatically use them if the processor supports it and will ignore them
otherwise.  This allows significant performance improvements where this
matters.  This is how libc6-i686 works.

--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Architecture Nomenclature

Kip Warner
On Tue, 2010-04-27 at 21:29 +0000, brian m. carlson wrote:
> As far as uname, not all machines that output i686 will support SSE2.
> Your assumption should be that i686 == Pentium Pro, with the caveat
> that
> not all i686 machines support cmov (some Via chips do not).

Thanks. If I was writing something for a 32-bit machine with SSE2
instruction set, what would be the most appropriate architecture name?

--
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Architecture Nomenclature

Kip Warner
In reply to this post by Ben Hutchings-3
On Tue, 2010-04-27 at 21:43 +0100, Ben Hutchings wrote:
> It must be 'i386'.

But i386 includes machines like the 486 and the Pentium Pro that did not
have SSE2 instruction set.

If I was writing something for a 32-bit machine with SSE2 instruction
set, what would be the most appropriate architecture name?

--
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Architecture Nomenclature

Benjamin Drung-3
Am Dienstag, den 27.04.2010, 14:45 -0700 schrieb Kip Warner:
> On Tue, 2010-04-27 at 21:43 +0100, Ben Hutchings wrote:
> > It must be 'i386'.
>
> But i386 includes machines like the 486 and the Pentium Pro that did not
> have SSE2 instruction set.
>
> If I was writing something for a 32-bit machine with SSE2 instruction
> set, what would be the most appropriate architecture name?

The best solution would be autodetection of SSE2 on runtime. That can be
done with a few lines of code.

--
Benjamin Drung
Ubuntu Developer (www.ubuntu.com) | Debian Maintainer (www.debian.org)

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Architecture Nomenclature

Kip Warner
On Wed, 2010-04-28 at 00:32 +0200, Benjamin Drung wrote:
>
> The best solution would be autodetection of SSE2 on runtime. That can
> be
> done with a few lines of code.

You're right, that can indeed be done with a few lines of code. e.g.
cpuid instruction. The problem is that you then have to perform a branch
every time you could potentially use hardware acceleration: a condition
for when, say, SSE2 is available, and another for a generic
implementation.

It isn't ideal performance wise.

Perhaps for 32-bit x86 architectures where SIMD is required, I could
build the package for i686 and have it detect at runtime before said is
actually used, whether it is available or not. If it is not, raise a
user visible error and terminate.

This method assumes the user knows that it is only supported on P4 or
later generation of x86.

--
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Architecture Nomenclature

Reinhard Tartler-5
On Mi, Apr 28, 2010 at 02:07:56 (CEST), Kip Warner wrote:

> On Wed, 2010-04-28 at 00:32 +0200, Benjamin Drung wrote:
>>
>> The best solution would be autodetection of SSE2 on runtime. That can
>> be
>> done with a few lines of code.
>
> You're right, that can indeed be done with a few lines of code. e.g.
> cpuid instruction.

SSE2 can be disabled for userland in the kernel. The implementation of
[1] requires this for example.

[1] http://portal.acm.org/citation.cfm?id=1752046.1752053

more safe approach include:

 - "avcodec": installing a SIGILL handler to divert some function
   pointers

 - "vlc": spawning a child process that does some sse instructions and
   check if it dies.

> The problem is that you then have to perform a branch every time you
> could potentially use hardware acceleration: a condition for when,
> say, SSE2 is available, and another for a generic implementation.
>
> It isn't ideal performance wise.

If you have both an SSE2 and C only implementation, you can use function
pointers that are set once, not every time the function is called. If
properly implemented, this hardly impacts performance.

> Perhaps for 32-bit x86 architectures where SIMD is required, I could
> build the package for i686 and have it detect at runtime before said is
> actually used, whether it is available or not. If it is not, raise a
> user visible error and terminate.

This can be implemented as SIGILL handler.

> This method assumes the user knows that it is only supported on P4 or
> later generation of x86.

--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]
Archive: http://lists.debian.org/87aaso5diu.fsf@...

Reply | Threaded
Open this post in threaded view
|

Re: Architecture Nomenclature

Goswin von Brederlow-2
Reinhard Tartler <[hidden email]> writes:

> On Mi, Apr 28, 2010 at 02:07:56 (CEST), Kip Warner wrote:
>
>> On Wed, 2010-04-28 at 00:32 +0200, Benjamin Drung wrote:
>>>
>>> The best solution would be autodetection of SSE2 on runtime. That can
>>> be
>>> done with a few lines of code.
>>
>> You're right, that can indeed be done with a few lines of code. e.g.
>> cpuid instruction.
>
> SSE2 can be disabled for userland in the kernel. The implementation of
> [1] requires this for example.
>
> [1] http://portal.acm.org/citation.cfm?id=1752046.1752053
>
> more safe approach include:
>
>  - "avcodec": installing a SIGILL handler to divert some function
>    pointers
>
>  - "vlc": spawning a child process that does some sse instructions and
>    check if it dies.
>
>> The problem is that you then have to perform a branch every time you
>> could potentially use hardware acceleration: a condition for when,
>> say, SSE2 is available, and another for a generic implementation.
>>
>> It isn't ideal performance wise.
>
> If you have both an SSE2 and C only implementation, you can use function
> pointers that are set once, not every time the function is called. If
> properly implemented, this hardly impacts performance.
>
>> Perhaps for 32-bit x86 architectures where SIMD is required, I could
>> build the package for i686 and have it detect at runtime before said is
>> actually used, whether it is available or not. If it is not, raise a
>> user visible error and terminate.
>
> This can be implemented as SIGILL handler.
>
>> This method assumes the user knows that it is only supported on P4 or
>> later generation of x86.

And if nothing else works then compile your source twice, once with SSE2
and once without. You can then use alternatives to let the admin choose
one or the other depending on their hardware.

MfG
        Goswin


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]
Archive: http://lists.debian.org/87r5m0kq4b.fsf@...

Reply | Threaded
Open this post in threaded view
|

Re: Architecture Nomenclature

Xavier Oswald-3
In reply to this post by Kip Warner
On 17:07 Tue 27 Apr     , Kip Warner wrote:

> On Wed, 2010-04-28 at 00:32 +0200, Benjamin Drung wrote:
> >
> > The best solution would be autodetection of SSE2 on runtime. That can
> > be
> > done with a few lines of code.
>
> You're right, that can indeed be done with a few lines of code. e.g.
> cpuid instruction. The problem is that you then have to perform a branch
> every time you could potentially use hardware acceleration: a condition
> for when, say, SSE2 is available, and another for a generic
> implementation.
>
> It isn't ideal performance wise.
Agreed. It's not the way we should go.

> Perhaps for 32-bit x86 architectures where SIMD is required, I could
> build the package for i686 and have it detect at runtime before said is
> actually used, whether it is available or not. If it is not, raise a
> user visible error and terminate.
>
> This method assumes the user knows that it is only supported on P4 or
> later generation of x86.

The point is that only few software use this kind of acceleration.

If you really want to have SS2 and such activated, I suggest to do a rebuilt of
all packages on your machine with your own architecture compilation options.

We want to keep i386 or 'i486' compatible and not loose any performance due to
performing a branch everytime you can activate an architecture optimization.
And if we go through such a way, it will be hard for developers to maintain
packages and it will require a lot of manpower.


Greetings,
--
 ,''`. Xavier Oswald ([hidden email])
: :' : GNU/LINUX Debian Developer <http://www.debian.org>
`. `'  GPG Key: 1024D/88BBB51E
  `-   938D D715 6915 8860 9679  4A0C A430 C6AA 88BB B51E

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Architecture Nomenclature

Josselin Mouette
In reply to this post by Kip Warner
Le mardi 27 avril 2010 à 17:07 -0700, Kip Warner a écrit :
> You're right, that can indeed be done with a few lines of code. e.g.
> cpuid instruction. The problem is that you then have to perform a branch
> every time you could potentially use hardware acceleration: a condition
> for when, say, SSE2 is available, and another for a generic
> implementation.
>
> It isn't ideal performance wise.

The simplest solution is to put the routines in a shared library and to
build two versions of the library. Put the i486 one in /usr/lib and the
SSE2 one in /usr/lib/i686/sse2.

--
 .''`.      Josselin Mouette
: :' :
`. `'   “A handshake with whitnesses is the same
  `-     as a signed contact.”  -- Jörg Schilling


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]
Archive: http://lists.debian.org/1272449593.27381.6.camel@meh

Reply | Threaded
Open this post in threaded view
|

Re: Architecture Nomenclature

Kip Warner
On Wed, 2010-04-28 at 12:13 +0200, Josselin Mouette wrote:
> The simplest solution is to put the routines in a shared library and
> to
> build two versions of the library. Put the i486 one in /usr/lib and
> the
> SSE2 one in /usr/lib/i686/sse2.

That might be the way to go. Thanks.

--
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

signature.asc (204 bytes) Download Attachment