Date: Thu, 12 May 2011 12:29:18 +0400 From: =?koi8-r?B?98zBxMnNydIg5sXdxc7Lzw==?= <vladimir-its@yandex.ru> To: freebsd-arm@freebsd.org Subject: S3C2440A strange perfomance issue Message-ID: <578421305188959@web64.yandex.ru>
index | next in thread | raw e-mail
Hi!
I have installed FreeBSD on GT2440 ARM9 development board (S3C2440A SoC).
I'm try compile next simple code:
Code:
%cat test.c
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
unsigned int area_size = 1024*1024;
unsigned int *p = (unsigned int *)malloc(area_size * sizeof(unsigned int));
if(p){
unsigned int cnt = 32;
while(cnt > 0){
unsigned int i = 0;
while(i < area_size){
p[i] = i;
i++;
}
cnt--;
}
free(p);
}else{
printf("memory allocation failed.\n");
}
return(0);
}
%cc -O0 -o test test.c
and execute it:
Code:
%/usr/bin/time -l ./test
120.16 real 119.44 user 0.16 sys
4824 maximum resident set size
4 average shared memory size
963 average unshared data size
128 average unshared stack size
1101 page reclaims
0 page faults
0 swaps
0 block input operations
0 block output operations
1 messages sent
0 messages received
0 signals received
2 voluntary context switches
12177 involuntary context switches
time of execution is over 120 sec ... but after system reboot:
Code:
%/usr/bin/time -l ./test
2.85 real 2.55 user 0.25 sys
4824 maximum resident set size
4 average shared memory size
953 average unshared data size
129 average unshared stack size
1101 page reclaims
0 page faults
0 swaps
0 block input operations
0 block output operations
1 messages sent
0 messages received
0 signals received
3 voluntary context switches
292 involuntary context switches
execution time is 2.85(!) sec, but it's not all!
Code:
%cat test > /dev/null
%/usr/bin/time -l ./test
120.40 real 119.51 user 0.23 sys
4824 maximum resident set size
4 average shared memory size
963 average unshared data size
128 average unshared stack size
1101 page reclaims
0 page faults
0 swaps
0 block input operations
0 block output operations
1 messages sent
0 messages received
0 signals received
2 voluntary context switches
12201 involuntary context switches
Once the file has been opened for reading (cat test > /dev/null), execution time again increased to 120 sec (until the next reboot).
What is it?!
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?578421305188959>
