Low memory bandwidth on Linux-Embedded (ARM)

I am using ARM926EJS. I get 20% faster memory speed in a memory test, without Linux (just like the Getting Started executable). But on Linux, the same code runs 20% slower.

Code

 
/// 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--)
}

, Linux. ( , , usr time)

, , Linux?

.

:

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);
 }
}

- bin, , . ( )

ADDED.

. SD RAM, DDR Ram. ?

. , Data Cache - Linux. - . Linux 20% .

: LPC3250. DDR.

+3
4

MMU, Linux, , . , . , Linux , , . , MMU , ​​ . - .

, Linux MMU (, uClinux). , . .

: :

Linux . ​​ () . 4 ( 32-) , RAM. , MMU . , RAM, , , . , ( 4 ) ; , , MMU .

+10

? .

, / ?

?

SDRAM - RAM ?

?

Clifford

+3

- . DDR.

, MMU. , ARM926EJS MMU.

, , , , Kernel Userpace , , , -, OS.

VIVT- Linux

+2

( ARM) ?

, , Linux, , , , Linux ? , - , Linux , Linux.

+1

Source: https://habr.com/ru/post/1717256/


All Articles