ioctl call long time
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 posixCONFIG_HZ=1000
Quoted 31 lines · Шевченко Тарас Григорьевич
Good day!
I try to use ioctl from user space to callioctl_rtin my modulecode 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;
caseXDMA_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
Quoted 7 lines
Xenomai 3.0.6
skin posixCONFIG_HZ=1000
_______________________________________________
Xenomai mailing list
[email protected]
https://xenomai.org/mailman/listinfo/xenomai
Do the QT functions call the Xenomai services under the hood? Can you confirm that rtdm_event_timedwait isn't timing out?
-Greg