Hi,
I'm doing some speed tests on a M548x and it seems a bit sluggish.
To begin, the OS is a linux-2.6.25.20 patched using the attached list of patches.
The patches we're downloaded from www.bitshrine.org while The compiler is a
vanilla gcc-4.4.0, without the CLoop and PPL included.
cat /proc/cpuinfo
CPU: ColdFire V4e
MMU: ColdFire
FPU: ColdFire V4e
Clocking: 198.2MHz
BogoMips: 198.24
Calibration: 991232 loops
Now, onto the tests.
I ran simple file copy from/to flash to/from RAM as can be seen
in the attached bench.sh.
/tmp is a RAM disk and / is the flash.
This is what I got from running bench.sh on ColdFire
time cat /tmp/test_file > /dev/null
real 0m 0.09s
user 0m 0.00s
sys 0m 0.09s
time cat /tmp/test_file > /test_file
real 0m 17.81s
user 0m 0.01s
sys 0m 17.80s
time cat /test_file > /dev/null
real 0m 0.10s
user 0m 0.01s
sys 0m 0.09s
time cat /test_file > /tmp/test_file2
real 0m 0.28s
user 0m 0.02s
sys 0m 0.27s
time cat /tmp/test_file > /tmp/test_file2
real 0m 0.29s
user 0m 0.00s
sys 0m 0.29s
/tmp
The same test was performed on an ARM
cat /proc/cpuinfo
Processor : ARM920T rev 0 (v4l)
BogoMIPS : 99.73
Features : swp half thumb crunch
With the following results:
time cat /tmp/test_file > /dev/null
real 0m 0.04s
user 0m 0.00s
sys 0m 0.04s
time cat /tmp/test_file > /test_file
real 0m 11.28s
user 0m 0.00s
sys 0m 7.15s
time cat /test_file > /dev/null
real 0m 0.04s
user 0m 0.00s
sys 0m 0.03s
time cat /test_file > /tmp/test_file2
real 0m 0.07s
user 0m 0.00s
sys 0m 0.05s
time cat /tmp/test_file > /tmp/test_file2
real 0m 0.06s
user 0m 0.00s
sys 0m 0.06s
/tmp
You can see that the test `time cat /tmp/test_file > /tmp/test_file2` performs real bad on
the ColdFire.
Have you any clues on this one ?
To make things clear, I placed the values in a table.
You can see that there is a problem when writing to Memory
CuCu | Z->M | M->N | M->M | M->F | F->N | F->F | F->M | ------+------+------+------+-------+------+-------+------+ VR900 | 0.24 | 0.08 | 0.27 | 17.82 | 0.08 | 17.73 | 0.27 | ARM | 0.06 | 0.04 | 0.07 | 09.56 | 0.04 | 9.57 | 0.07 | VR/ARM| 4 | 2 | 3.85 | 1.86 | 2 | 1.8 | 3.85 | Z->M : read from /dev/zero, write to Memory. M->N : read from Memory, write to /dev/null M->M : Read from Memory, write to Memory M->F : read from Memory, write to Flash F->N : read from Flash, write to /dev/null F->M : read from Flash, write to Memory
Could you post your memory settings in include/asm-m68k/cf_pgtable.h arch/m68k/coldfire/head.S and the assembly code for the memory test?
I attached the requested files.
For memory test I used
dd if=/dev/zero of=/tmp/test_file bs=1M count=1, with the "dd" from busybox-1.13.4[1]
[1]: http://git.busybox.net/busybox/tree/coreutils/dd.c?id=1_13_4
This is the strace output:
# strace dd if=/dev/zero of=/tmp/test_file bs=1M count=1 execve("/bin/dd", ["dd", "if=/dev/zero", "of=/tmp/test_file", "bs=1M", "count=1"], [/* 14 vars */]) = 0 old_mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0x75) = 0x8006a000 stat("/etc/ld.so.cache", 0xbfac9998) = -1 ENOENT (No such file or directory) stat("/etc/ld.so.preload", 0xbfac9b34) = -1 ENOENT (No such file or directory) open("/lib/libc.so.0", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0444, st_size=233724, ...}) = 0 old_mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0x75) = 0x8006c000 read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\4\0\0\0\1\0\0\270|\0\0\0004\0"..., 8192) = 8192 old_mmap(NULL, 262144, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0x75) = 0x8006e000 old_mmap(0x8006e000, 229924, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x75) = 0x8006e000 old_mmap(0x800a8000, 4348, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x3800000000075) = 0x800a8000 old_mmap(0x800aa000, 14916, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0x75) = 0x800aa000 close(3) = 0 munmap(0x8006c000, 8192) = 0 stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0555, st_size=15780, ...}) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo ...}) = 0 ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo ...}) = 0 getuid32() = 0 old_mmap(NULL, 1056768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0x75) = 0x800ae000 open("/dev/zero", O_RDONLY) = 3 dup2(3, 0) = 0 close(3) = 0 open("/tmp/test_file", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3 dup2(3, 1) = 1 close(3) = 0 read(0, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1048576) = 1048576 write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1048576) = 1048576 close(0) = 0 close(1) = 0 write(2, "1"..., 11) = 1 write(2, "+"..., 1+) = 1 write(2, "0"..., 10) = 1 write(2, " records in\n"..., 12 records in ) = 12 write(2, "1"..., 11) = 1 write(2, "+"..., 1+) = 1 write(2, "0"..., 10) = 1 write(2, " records out\n"..., 13 records out ) = 13 _exit(0) = ?