Time from interrupt signal to user space handling
by zvivered from LinuxQuestions.org on (#5135Q)
Hello,
Under vanilla 4.9.20 (x32, busybox) I'm running the following application:
An FPGA creates a PCIe (MSIx) interrupt every 2msec.
The interrupt is handled by a kernel driver.
Upon creating the interrupt, timetag(T1) is locked in a 32 bits register in FPGA.
The application launches a thread.
This thread sends an IOCTL request to the device driver.
This IOCTL is answered upon interrupt.
At this point, timetag(T2) is read.
I loogged T2-T1 and expected it to be less than 100usec.
But this diff is sometimes ~500msec.
The kernel is built with CONFIG_PREEMPT (Low-Latency Desktop)
Is it wise to set the priority of my process to the highest possible value ?
Thank you,
Zvika


Under vanilla 4.9.20 (x32, busybox) I'm running the following application:
An FPGA creates a PCIe (MSIx) interrupt every 2msec.
The interrupt is handled by a kernel driver.
Upon creating the interrupt, timetag(T1) is locked in a 32 bits register in FPGA.
The application launches a thread.
This thread sends an IOCTL request to the device driver.
This IOCTL is answered upon interrupt.
At this point, timetag(T2) is read.
I loogged T2-T1 and expected it to be less than 100usec.
But this diff is sometimes ~500msec.
The kernel is built with CONFIG_PREEMPT (Low-Latency Desktop)
Is it wise to set the priority of my process to the highest possible value ?
Thank you,
Zvika