All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] ipipe-gch-ipipe-3.0-imx6q latency
@ 2015-12-08 10:43 eric
  2015-12-08 11:23 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 15+ messages in thread
From: eric @ 2015-12-08 10:43 UTC (permalink / raw)
  To: xenomai@xenomai.org

hello:
        I use xenomai-2.6.4 with kernel ipipe-gch-ipipe-3.0-imx6q.tar.bz2   with sample test  , build  the flow module with  timer 250us cycle,if I make a user space application with memory copy ,the kernel latency will very big ,why??? thanks
latency :
pmax: 0.508624 ms
pmax: 0.533823 ms
pmax: 0.553197 ms
pmax: 0.603770 ms
pmax: 0.613982 ms
pmax: 0.638025 ms
pmax: 0.662129 ms
pmax: 0.699245 ms
pmax: 0.780533 ms
pmax: 0.800770 ms
pmax: 0.802066 ms
pmax: 0.813921 ms
pmax: 0.816330 ms
pmax: 0.820429 ms
pmax: 0.820483 ms
pmax: 0.821783 ms
pmax: 0.827649 ms
pmax: 0.833197 ms
pmax: 0.837606 ms
pmax: 0.843921 ms
pmax: 0.874033 ms
pmax: 0.892414 ms
pmax: 0.892788 ms




usr application:
#include <stdio.h>
int main()
{
char a[1024*1024]={9};
char b[1024*1024];
    while(1){
    memcpy(b,a,1024*800);
    }
return 0;
}


kernel module   code :


#define TASK_PRIO 99 // 99 is Highest RT priority
#define TASK_MODE 0 // No flags
#define TASK_STKSZ 0 // default Stack size


#define TASK_PERIOD 250000ll // in nano seconds = 500 ms
long long pmax,start,stop;
static rtdm_task_t td;    //RTDM Real time task pointer
char logo[40*1024]={0};
char mem_spvm[40*1024];
long long runcount=0;
void periodic (void *arg) {
long max,pmax;


for (;;) {
rtdm_task_wait_period(); //deschedule until next period


stop =rtdm_clock_read();
memset(mem_spvm,0,sizeof(logo));
memcpy(mem_spvm,logo,sizeof(logo));
memset(mem_spvm,127,sizeof(logo));
memcpy(mem_spvm,logo,sizeof(logo));


//stop = rtdm_clock_read();
if(runcount<1000)
{
pmax=0;
}
if(pmax<(stop-start)){
  pmax=stop-start;
  printk("pmax: %ld.%06ld ms\n",(long)pmax/1000000,(long)pmax%1000000);
}
start=stop;
runcount++;
}
}




int init_module(void) {
   return rtdm_task_init (&td, "periodic", &periodic, NULL, TASK_PRIO,TASK_PERIOD);
}


void cleanup_module(void) {
rtdm_task_destroy(&td);
}


MODULE_LICENSE("GPL");   

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-12-15  7:05 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-08 10:43 [Xenomai] ipipe-gch-ipipe-3.0-imx6q latency eric
2015-12-08 11:23 ` Gilles Chanteperdrix
2015-12-14  2:13   ` eric
2015-12-14  6:42     ` Gilles Chanteperdrix
2015-12-14  7:57       ` eric
2015-12-14  8:03         ` Gilles Chanteperdrix
2015-12-14  8:30           ` eric
2015-12-14  9:04             ` [Xenomai] Compileerror rt_imx_uart.c on kernel 3.10.53 ARM Wolfgang Netbal
2015-12-14 22:48               ` Gilles Chanteperdrix
2015-12-14  9:05             ` [Xenomai] ipipe-gch-ipipe-3.0-imx6q latency eric
2015-12-14 22:19               ` Gilles Chanteperdrix
2015-12-15  0:54                 ` eric
2015-12-15  6:17                   ` Gilles Chanteperdrix
2015-12-15  7:05                     ` eric
2015-12-14  8:08         ` eric

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.