Good day! 
I try to use ioctl from user space to call ioctl_rt in my module 

code user space 

QDateTime t1 = QDateTime::currentDateTime(); 
for (int ij =0; ij<1000; ij++) { 
ret=ioctl(fpga_fd, XDMA_EXCHANGE_DATA, lenErpPcie_wr); // if comment this line 
, runtime abaut 1 mks 
} 
QDateTime t2 = QDateTime::currentDateTime(); 
qint64 tt = t2.toMSecsSinceEpoch() - t1.toMSecsSinceEpoch(); 
printf("readwriteFPGA 1000 time = %d \n",(int)tt); 

driver code: 

int xilinx_ioctl_rt( struct rtdm_fd *fd, unsigned int cmd, void __user *arg) { 
long ret = -EINVAL; 
case XDMA_EXCHANGE_DATA: 
// printk(KERN_INFO "time start"); 
ret=rtdm_event_timedwait(&fpga_event,25000,NULL); 
//printk(KERN_INFO "time end"); 
break; 

} 
return ret; 
} 

the problem is I always get time aproximately 200mks + xxx 000 mks time to wait 
but if I uncomment printk lines I can see time to wait are respected in kernel 
log 
How I can minimaze ioctl call delay ? I need exchange data every 100 mks 

Xenomai 3.0.6 
skin posix 
CONFIG_HZ=1000 
_______________________________________________
Xenomai mailing list
Xenomai@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai
  • [Xenomai] ioctl call lo... Шевченко Тарас Григорьевич

Reply via email to