Hi,
I have a problem with QNX 6.5 Service Pack 1.
I have a thread running at high priority (15) used to talk to a custom PCI device. This thread attach an interrupt to the PCI device via the InterruptAttach() function and then go into an infinite loop that will block on this interrupt via the InterruptWait() function. By profiling the application with the QNX system profiler, I found out that shortly after the ISR is executed, the thread transition from the “INTERRUPT” state to the “READY” state. It then takes approximately 25us before the thread becomes “RUNNING”.
However, on some very rare occasion, the thread will stay in the “READY” state for a very long period of time (50 to 100ms) even though the CPU2 (the thread is forced on CPU2) is running the idle task the whole time. The ISR still processes new incoming interrupts, but the working thread is stuck on the “READY” state. This kind of jitter is not acceptable for my application.
I have found a known issue in the QNX 6.5 release notes that correspond to my problem:
We've observed an issue in the x86 SMP kernel where a ready thread sometimes won't run on an idling CPU:
On interrupt entry, if the CPU is halted (because the idle thread executed a halt instruction), then the interrupted context could be mistakenly identified as “kernel” instead of “user.” This isn't a result of the halt itself, but rather that idle thread is making a kernel call to call halt.
On interrupt exit, the behavior depends on the interrupted context, whether another CPU holds a kernel lock, etc. Under certain conditions, this issue could cause either the rescheduling not to be done and the idle thread to run until the next interrupt, or the idle thread to attempt to reacquire the kernel (with priority 0) instead of “force kernel” (with the highest priority).
(Ref# 156062, J383827)
Workaround: Specify the -h option for procnto-smp, to disable CPU halting in the idle thread.
I have tried the specified workaround without success.
My processor is an i7-2710QE with QM77 chipset.
I would like to know if anyone had similar issues with QNX and if so, what was your solution.
As a side note, I have also tried the following things without success:
-Deactivate Hyperthreading by BIOS configuration
-Disable power management features (p-states and c-states) by BIOS config