# N270 & Processor Family (Kernel)

## Coin Coin

Hmm, I have an Intel Atom N270:

```
vendor_id  : GenuineIntel

cpu family : 6

model       : 28

model name : Intel(R) Atom(TM) CPU N270   @ 1.60GHz
```

and I'm using kernel 2.6.27-r5

I'm wondering which processor family I should use

The cpu family is the same with the one from core 2 duo, so can I select Core 2? Or is it totally unrelated?

Thanks

----------

## jel

 *Coin Coin wrote:*   

> 
> 
> The cpu family is the same with the one from core 2 duo, so can I select Core 2? Or is it totally unrelated?
> 
> Thanks

 

N270 implements the vector instructions but lacks x86-64 and virtualization. See http://en.wikipedia.org/wiki/List_of_Intel_Atom_microprocessors

 *Quote:*   

> 
> 
> Netbook processors (Laptop)
> 
> Atom N27x series (single-core)
> ...

 

cf. http://en.wikipedia.org/wiki/List_of_Intel_Core_2_microprocessors

----------

## Coin Coin

Hmm, so I have to select Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon?

[Edit] Hmm, Pentium M seems the most appropriate for Atom, but lack of sse3, ssse3?

----------

## Coin Coin

I think I'll use:

```
-march=prescott
```

the most appropriate for atom instruction

and for the kernel:

```
CONFIG_MPENTIUMM

CONFIG_X86_SPEEDSTEP_ICH
```

----------

## Coin Coin

Hmm, I'm wondering if I compile with -march=prescott which has SSE3 that Pentium M don't have, will be a problem?

----------

## jel

 *Coin Coin wrote:*   

> Hmm, I'm wondering if I compile with -march=prescott which has SSE3 that Pentium M don't have, will be a problem?

 

I think you are micro-optimizing. You could probably do just fine with pentium4 or i686. I don't believe the linux kernel uses SSE3.

----------

## pigeon768

-march=prescott is fine.

If you're using gcc 4.3 or above, use -march=native and be done with it.

----------

## rufnut

 *jel wrote:*   

> 
> 
> I think you are micro-optimizing. You could probably do just fine with pentium4 or i686. I don't believe the linux kernel uses SSE3.

 

I wouldn't say that, I have had a machine with a "prescott" CPU then installed a "northwood" CPU and the kernel wouldn't boot with a kernel panic.

My advice for this thread is "prescott"  to be safe.

However,  I have noticed a kernel config on ubuntu forums that uses :

CONFIG_MCORE2=y

http://dismantle-it.blogspot.com/2008/11/custom-ubuntu-kernel-for-acer-aspire.html

The post is for an Acer Aspire One that uses an Intel Atom

Actually when you think about that should be ok as we are compiling a 32 bit kernel and E4000 series C2 dont have VT.

With a bit of luck "SSSE3" will get picked up and used.

The above will probably require a later "gcc" as already stated.

 :Smile:   Have fun with your Atom

----------

## bigmauler

I was Googling around and I found this

on google cache..the auther took down this site

 *Quote:*   

> A lot of people don’t know that the Intel Atom cpu is a so-called in-order cpu. Starting from the Intel Pentium Pro all x86 compatible cpu’s are out-of-order cpu’s. The basic difference between those two orders is, that the out-of-order cpu’s can re-organize the instructions they have to execute (if this wouldn’t change the workings of the running program of course). This can improve the execution speed quite well. However, because the Intel Atom can’t do that, we don’t want the compiler to optimize for an out-of-order cpu. Therefore, never chose anything better then -march=pentium-mmx. I’m currently using:
> 
>     CFLAGS=”-O2 -march=i586 -mmmx -msse -msse2 -msse3 -pipe”
> 
> And this seems to work fine.

 

is there any validity to this statement?

----------

## frenkel

Yes, see also this: http://en.wikipedia.org/wiki/Out-of-order_execution

----------

## nerdbert

 *bigmauler wrote:*   

> is there any validity to this statement?

 

While the in-order argument makes sense to me a simple run of nbench gave me mixed results.  I'll stick to march=prescott until gcc recognizes the N270.

Here's the output from nbench:

```

CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"

BYTEmark* Native Mode Benchmark ver. 2 (10/95)

Index-split by Andrew D. Balsa (11/97)

Linux/Unix* port by Uwe F. Mayer (12/96,11/97)

TEST                : Iterations/sec.  : Old Index   : New Index

                    :                  : Pentium 90* : AMD K6/233*

--------------------:------------------:-------------:------------

NUMERIC SORT        :          538.68  :      13.81  :       4.54

STRING SORT         :          57.897  :      25.87  :       4.00

BITFIELD            :      1.8324e+08  :      31.43  :       6.57

FP EMULATION        :          43.548  :      20.90  :       4.82

FOURIER             :          7640.4  :       8.69  :       4.88

ASSIGNMENT          :           10.82  :      41.17  :      10.68

IDEA                :          1597.4  :      24.43  :       7.25

HUFFMAN             :           970.3  :      26.91  :       8.59

NEURAL NET          :          7.0755  :      11.37  :       4.78

LU DECOMPOSITION    :          326.12  :      16.89  :      12.20

==========================ORIGINAL BYTEMARK RESULTS==========================

INTEGER INDEX       : 25.144

FLOATING-POINT INDEX: 11.861

Baseline (MSDOS*)   : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0

==============================LINUX DATA BELOW===============================

CPU                 : Dual GenuineIntel Intel(R) Atom(TM) CPU N270   @ 1.60GHz 1600MHz

L2 Cache            : 512 KB

OS                  : Linux 2.6.27-gentoo-r7

C compiler          : i686-pc-linux-gnu-gcc

libc                : 

MEMORY INDEX        : 6.548

INTEGER INDEX       : 6.077

FLOATING-POINT INDEX: 6.578

Baseline (LINUX)    : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38

* Trademarks are property of their respective holder.

CFLAGS="-march=i586 -O2 -mmmx -msse -msse2 -msse3 -fomit-frame-pointer"

BYTEmark* Native Mode Benchmark ver. 2 (10/95)

Index-split by Andrew D. Balsa (11/97)

Linux/Unix* port by Uwe F. Mayer (12/96,11/97)

TEST                : Iterations/sec.  : Old Index   : New Index

                    :                  : Pentium 90* : AMD K6/233*

--------------------:------------------:-------------:------------

NUMERIC SORT        :          525.24  :      13.47  :       4.42

STRING SORT         :          56.652  :      25.31  :       3.92

BITFIELD            :      1.7014e+08  :      29.18  :       6.10

FP EMULATION        :          41.069  :      19.71  :       4.55

FOURIER             :          7669.1  :       8.72  :       4.90

ASSIGNMENT          :          12.475  :      47.47  :      12.31

IDEA                :          1616.8  :      24.73  :       7.34

HUFFMAN             :          966.09  :      26.79  :       8.55

NEURAL NET          :          8.0172  :      12.88  :       5.42

LU DECOMPOSITION    :          413.52  :      21.42  :      15.47

==========================ORIGINAL BYTEMARK RESULTS==========================

INTEGER INDEX       : 25.037

FLOATING-POINT INDEX: 13.400

Baseline (MSDOS*)   : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0

==============================LINUX DATA BELOW===============================

CPU                 : Dual GenuineIntel Intel(R) Atom(TM) CPU N270   @ 1.60GHz 1600MHz

L2 Cache            : 512 KB

OS                  : Linux 2.6.27-gentoo-r7

C compiler          : i686-pc-linux-gnu-gcc

libc                : 

MEMORY INDEX        : 6.650

INTEGER INDEX       : 5.962

FLOATING-POINT INDEX: 7.432

Baseline (LINUX)    : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38

* Trademarks are property of their respective holder.
```

One last note: nbench might not be the perfect benchmark to test this. I'll run some other tests and post them here in case they give me different results...

----------

## rufnut

 *Quote:*   

> until gcc recognizes the N270

 

Yeah , I found some interesting things today.

Using GCC 4.3.2-r2 CFLAGS="-march=native -02 -pipe"

```

nbench

BYTEmark* Native Mode Benchmark ver. 2 (10/95)

Index-split by Andrew D. Balsa (11/97)

Linux/Unix* port by Uwe F. Mayer (12/96,11/97)

TEST                : Iterations/sec.  : Old Index   : New Index

                    :                  : Pentium 90* : AMD K6/233*

--------------------:------------------:-------------:------------

NUMERIC SORT        :           442.8  :      11.36  :       3.73

STRING SORT         :          58.017  :      25.92  :       4.01

BITFIELD            :      1.7285e+08  :      29.65  :       6.19

FP EMULATION        :          56.852  :      27.28  :       6.29

FOURIER             :          7424.8  :       8.44  :       4.74

ASSIGNMENT          :          11.711  :      44.56  :      11.56

IDEA                :          1877.7  :      28.72  :       8.53

HUFFMAN             :          911.61  :      25.28  :       8.07

NEURAL NET          :          7.2549  :      11.65  :       4.90

LU DECOMPOSITION    :           408.6  :      21.17  :      15.29

==========================ORIGINAL BYTEMARK RESULTS==========================

INTEGER INDEX       : 25.845

FLOATING-POINT INDEX: 12.771

Baseline (MSDOS*)   : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0

==============================LINUX DATA BELOW===============================

CPU                 : Dual GenuineIntel Intel(R) Atom(TM) CPU N270   @ 1.60GHz 1600MHz

L2 Cache            : 512 KB

OS                  : Linux 2.6.28-gentoo-one

C compiler          : i686-pc-linux-gnu-gcc

libc                :

MEMORY INDEX        : 6.598

INTEGER INDEX       : 6.340

FLOATING-POINT INDEX: 7.083

Baseline (LINUX)    : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38

* Trademarks are property of their respective holder.

```

Similar to yours , so I started looking at what is being used and updated an older script;

https://forums.gentoo.org/viewtopic-p-5390486.html#5390486

The script on the above page may come in handy for you.

What I found interesting is that, I also have a core2 machine and the script on nbench provides this;

```

localhost / # ./analyse-x86 /usr/bin/nbench

Checking vendor_id string...GenuineIntel

Disassembling /usr/bin/nbench, please wait...

i486:    0 i586:    0 ppro:    0 mmx:   46 sse:   26 sse2:  426 sse3:    0 ssse3:    0 sse4.1:    0 sse4.2:    0

/usr/bin/nbench will run on Pentium IV (pentium4) or higher processor.

```

This looks well and maybe nbench only knew how to use up to sse2 instructions, thats fine but look at what happens on my Atom based laptop below;

```

./analyse-x86 /usr/bin/nbench

Checking vendor_id string...GenuineIntel

Disassembling /usr/bin/nbench, please wait...

i486:    0 i586:    0 ppro:   21 mmx:    2 sse:    0 sse2:    0 sse3:    0 ssse3:    0 sse4.1:    0 sse4.2:    0

/usr/bin/nbench will run on Pentium II (pentium2) or higher processor.

```

I expected at least an sse2 instruction to be used?

Both the Core2 machine and the Atom have GCC 4.3.2-r2 CFLAGS="-march=native -02 -pipe"

The core2 machine is x86_64.

I tried changing the flags round a bit on the Atom (prescott,nocona,core2) but it didn't change much.

I do have the kernel compiled on the Atom as Core2 so maybe something is amiss there?

It would be good to actually use some of the instructions the Atom has.   :Rolling Eyes: 

----------

## nerdbert

I think nbench is not really suitable for the tests - it's way too old and it doesn't use many features.

I had a problem running your modified script. It throws lots of those:

```
./analyze-x86: line 51: printf:  : invalid number

./analyze-x86: line 52: 0: command not foundse:    0 sse2:    0 sse3:    0 ssse3:    0 sse4.1:    0 sse4.2:    0

./analyze-x86: line 94: printf:  : invalid number

./analyze-x86: line 95: 0: command not foundse:    0 sse2:    0 sse3:    0 ssse3:    0 sse4.1:    0 sse4.2:    0

./analyze-x86: line 94: printf:  : invalid number

./analyze-x86: line 95: 0: command not foundse:    0 sse2:    0 sse3:    0 ssse3:    0 sse4.1:    0 sse4.2:    0

./analyze-x86: line 94: printf:  : invalid number

./analyze-x86: line 95: 0: command not foundse:    0 sse2:    0 sse3:    0 ssse3:    0 sse4.1:    0 sse4.2:    0
```

Could you provide us with a link to a properly formated version (these errors seem to be related to line breaks)?

I'm currently checking out acovea, which tries to find the optimal compiler flags by testing all sorts of flag combinations on a benchmark. Pretty much what we tried by hand so far...

----------

## rufnut

Hi again,

Yeah there did seem to be some line breaks , but I pasted it back and tried, still worked ok for me?

I guess the editor you paste to should have line wrapping and features like that off.

http://rafb.net/p/aeeIVc67.html

Maybe try the above post.

Do you know of a good file hosting place I can place the script ?

----------

## rufnut

ICC seems to work well on nbench , shame it doesn't work for all packages.

 ICC 10.1018 ICCCFLAGS="-O2 -xL -gcc"

```
nbench

BYTEmark* Native Mode Benchmark ver. 2 (10/95)

Index-split by Andrew D. Balsa (11/97)

Linux/Unix* port by Uwe F. Mayer (12/96,11/97)

TEST                : Iterations/sec.  : Old Index   : New Index

                    :                  : Pentium 90* : AMD K6/233*

--------------------:------------------:-------------:------------

NUMERIC SORT        :          795.52  :      20.40  :       6.70

STRING SORT         :          61.886  :      27.65  :       4.28

BITFIELD            :      2.2245e+08  :      38.16  :       7.97

FP EMULATION        :           98.08  :      47.06  :      10.86

FOURIER             :           12696  :      14.44  :       8.11

ASSIGNMENT          :          8.7233  :      33.19  :       8.61

IDEA                :          2292.7  :      35.07  :      10.41

HUFFMAN             :          682.26  :      18.92  :       6.04

NEURAL NET          :          12.161  :      19.54  :       8.22

LU DECOMPOSITION    :          366.16  :      18.97  :      13.70

==========================ORIGINAL BYTEMARK RESULTS==========================

INTEGER INDEX       : 30.085

FLOATING-POINT INDEX: 17.490

Baseline (MSDOS*)   : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0

==============================LINUX DATA BELOW===============================

CPU                 : Dual GenuineIntel Intel(R) Atom(TM) CPU N270   @ 1.60GHz 1600MHz

L2 Cache            : 512 KB

OS                  : Linux 2.6.28-gentoo-one

C compiler          : icc

libc                :

MEMORY INDEX        : 6.647

INTEGER INDEX       : 8.225

FLOATING-POINT INDEX: 9.701

Baseline (LINUX)    : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38

* Trademarks are property of their respective holder.

```

The compiler also uses more instructions too.

```
./analyse-x86 /usr/bin/nbench

Checking vendor_id string...GenuineIntel

Disassembling /usr/bin/nbench, please wait...

i486:    0 i586:    2 ppro:    0 mmx:   69 sse:  516 sse2:  930 sse3:   14 ssse3:    0 sse4.1:    0 sse4.2:    0

This binary was found to contain the cpuid instruction.

It may be able to conditionally execute instructions if

they are supported on the host (i586+).

/usr/bin/nbench will run on Pentium IV (prescott) or higher processor.

```

----------

