Linus,
it seems to be that it depends on gcc and flags.
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 2
model name : AMD Athlon(tm) Processor
stepping : 2
cpu MHz : 998.068
cache size : 512 KB
/home/nuetzel> gcc -v
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs
gcc version 2.95.3 20010315 (SuSE)
SuSE default (-march=i486 -mcpu=i486)
/home/nuetzel> gcc -o TLB_miss TLB_miss.c
/home/nuetzel> time ./TLB_miss
12.72: 19
85.15: 21
0.460u 0.050s 0:00.50 102.0% 0+0k 0+0io 101pf+0w
/home/nuetzel> gcc -mcpu=i486 -o TLB_miss TLB_miss.c
/home/nuetzel> time ./TLB_miss
12.75: 19
84.92: 21
0.510u 0.010s 0:00.51 101.9% 0+0k 0+0io 101pf+0w
/home/nuetzel> gcc -mcpu=i686 -o TLB_miss TLB_miss.c
/home/nuetzel> time ./TLB_miss
12.96: 19
84.57: 21
0.460u 0.050s 0:00.50 102.0% 0+0k 0+0io 101pf+0w
/home/nuetzel> gcc -mcpu=k6 -o TLB_miss TLB_miss.c
/home/nuetzel> time ./TLB_miss
13.16: 19
84.88: 21
0.490u 0.010s 0:00.50 100.0% 0+0k 0+0io 101pf+0w
/home/nuetzel> gcc -O2 -mcpu=i686 -o TLB_miss TLB_miss.c
/home/nuetzel> time ./TLB_miss
2.03: 67
1.33: 80
3.50: 82
19.65: 91
1.37: 92
18.17: 93
1.59: 94
41.68: 97
2.83: 98
1.82: 106
1.60: 107
0.450u 0.000s 0:00.46 97.8% 0+0k 0+0io 101pf+0w
/home/nuetzel> gcc -O2 -mcpu=i486 -o TLB_miss TLB_miss.c
/home/nuetzel> time ./TLB_miss
1.98: 67
1.28: 80
3.37: 82
19.78: 91
1.37: 92
18.30: 93
1.59: 94
41.71: 97
2.84: 98
1.82: 106
1.60: 107
0.440u 0.010s 0:00.46 97.8% 0+0k 0+0io 101pf+0w
/home/nuetzel> gcc -O -mcpu=i486 -o TLB_miss TLB_miss.c
/home/nuetzel> time ./TLB_miss
31.73: 19
46.76: 22
9.90: 29
8.23: 30
0.430u 0.030s 0:00.45 102.2% 0+0k 0+0io 101pf+0w
/home/nuetzel> gcc -O1 -mcpu=i486 -o TLB_miss TLB_miss.c
/home/nuetzel> time ./TLB_miss
35.17: 19
47.28: 22
7.92: 29
6.70: 30
0.420u 0.040s 0:00.45 102.2% 0+0k 0+0io 101pf+0w
/home/nuetzel> gcc -Os -mcpu=i486 -o TLB_miss TLB_miss.c
/home/nuetzel> time ./TLB_miss
2.66: 67
1.79: 80
4.51: 82
18.58: 91
1.31: 92
17.11: 93
1.68: 94
40.38: 97
2.87: 98
1.80: 106
1.68: 107
0.470u 0.010s 0:00.49 97.9% 0+0k 0+0io 101pf+0w
/home/nuetzel> gcc -march=i486 -mcpu=i486 -o TLB_miss TLB_miss.c
/home/nuetzel> time ./TLB_miss
17.12: 19
80.45: 21
0.480u 0.030s 0:00.50 102.0% 0+0k 0+0io 101pf+0w
/home/nuetzel> gcc -march=i686 -mcpu=i686 -o TLB_miss TLB_miss.c
/home/nuetzel> time ./TLB_miss
17.23: 19
80.57: 21
0.480u 0.010s 0:00.50 98.0% 0+0k 0+0io 101pf+0w
/home/nuetzel> gcc -march=k6 -mcpu=k6 -o TLB_miss TLB_miss.c
/home/nuetzel> time ./TLB_miss
14.15: 19
83.81: 21
0.480u 0.030s 0:00.50 102.0% 0+0k 0+0io 101pf+0w
-- Dieter Nützel Graduate Student, Computer ScienceUniversity of Hamburg Department of Computer Science @home: Dieter.Nuetzel@hamburg.de
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/