Hi Friends,
I am using ARM926EJS. I am getting 20 % more memory speed in memory copy test, without Linux ( Just as a Getting Started executable). But in linux same code is running 20% slower.
Code is
/// Below code just performs burst mode memcopy test. void asmcpy(void *a, void *b, int iSize) { do { asm volatile ( "ldmia %0!, {r3-r10} \n\t" "stmia %0!, {r3-r10} \n\t" :"+r"(a), "+r"(b) : :"r"(r3),"r"(r4),"r"(r5),"r"(r6),"r"(r7),"r"(r8),"r"(r9),"r"(r10) ); }while(size--) }
I verified that no other process is taking CPU time on linux.( I checked this with the use of time command, It shows real time is same as usr time)
Please tell me what can be the problem with linux?
Thanks & Regards.
ADDED:
my test code is
int main() { int a[320 * 120], b[320 * 120]; for(int i=0; i != 10000; i++) { /// Size is divided by 8 because our memcpy function performs 8 integer load stores in the iteration asmcpy(a, b, (320 * 120) / 8); } }
Getting Started executable is a bin file which is sent to the RAM using serial port and executes directly by jumping to that address in RAM. (without the need of an OS)
ADDED.
I haven't seen such performance difference on other processors.They were using SD RAM, This processor is using DDR Ram. Can it be a reason?
ADDED. Data Cache is not enabled in getting started code and Data Cache is eabled in Linux mode, So Ideally all data should be cached and get accessed without any RAM latency, But still Linux is 20% slow.
ADDED: My microcontroller is LPC3250. Both the test are been tested on same external DDR RAM.