Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - QNX6.5.1/6.6/7.0 has interrupt latency issue on Intel BayTrail platform: (6 Items)
   
QNX6.5.1/6.6/7.0 has interrupt latency issue on Intel BayTrail platform  
   With the interrupt latency tool from QNX, I test my several BayTrail platforms (with J1900/E3845/E3825 processors), 
all target platforms have interrupt latency issue, testing result is here:
      # ./latency_500000 
      START: ./latency_500000, pid 102422
      LOOPS: 500000 
      POINT: file latency.c, line 179 interrupt/schedulling latency, 999.987 Hz, 2000001383 cycles/sec
      PASS:  file latency.c, line 222 latency min = 1.488 usec, avg = 1.792 usec, max = 435.084 usec
      STOP:  ./latency_500000, pid 102422 point=1,pass=1,fail=0,xpass=0,xfail=0,unres=0
   
   From the test result, we can see, the max value is 435.084 usec, this value is too large, the normal value should be 
less than 50 usec, after change the OS version from QNX 6.5.1 to QNX 6.6/QNX7, the test result still be the same.
   I run the same OS image & interrupt latency tool on other X86 platforms, such as ivyBridge/Haswell/SkyLake, the test 
result is OK, max latency value will be less than 20 usec.
   Further on, re-back to the BayTrail platform, if I disable the xHCI USB 3.0 Controller at BIOS, the interrupt latency
 issue will disappear, test result is here:
      # ./latency_500000 
      START: ./latency_500000, pid 69654
      LOOPS: 500000 
      POINT: file latency.c, line 179 interrupt/schedulling latency, 999.987 Hz, 2000001383 cycles/sec
      PASS:  file latency.c, line 222 latency min = 1.488 usec, avg = 1.678 usec, max = 19.092 usec
      STOP:  ./latency_500000, pid 69654 point=1,pass=1,fail=0,xpass=0,xfail=0,unres=0

   I don't know why BayTrail platform has this issue, but other X86 platform (such as ivyBridge/Haswell/SkyLake) is OK?
RE: QNX6.5.1/6.6/7.0 has interrupt latency issue on Intel BayTrail platform  
This may not be directly related to the problem you are seeing, but we found out that BayTrail boards do not keep time 
accurately, which may skew the results.

--Elad
________________________________________
From: john xi [community-noreply@qnx.com]
Sent: October-26-17 11:01 PM
To: ostech-core_os
Subject: QNX6.5.1/6.6/7.0 has interrupt latency issue on Intel BayTrail platform

   With the interrupt latency tool from QNX, I test my several BayTrail platforms (with J1900/E3845/E3825 processors), 
all target platforms have interrupt latency issue, testing result is here:
      # ./latency_500000
      START: ./latency_500000, pid 102422
      LOOPS: 500000
      POINT: file latency.c, line 179 interrupt/schedulling latency, 999.987 Hz, 2000001383 cycles/sec
      PASS:  file latency.c, line 222 latency min = 1.488 usec, avg = 1.792 usec, max = 435.084 usec
      STOP:  ./latency_500000, pid 102422 point=1,pass=1,fail=0,xpass=0,xfail=0,unres=0

   From the test result, we can see, the max value is 435.084 usec, this value is too large, the normal value should be 
less than 50 usec, after change the OS version from QNX 6.5.1 to QNX 6.6/QNX7, the test result still be the same.
   I run the same OS image & interrupt latency tool on other X86 platforms, such as ivyBridge/Haswell/SkyLake, the test 
result is OK, max latency value will be less than 20 usec.
   Further on, re-back to the BayTrail platform, if I disable the xHCI USB 3.0 Controller at BIOS, the interrupt latency
 issue will disappear, test result is here:
      # ./latency_500000
      START: ./latency_500000, pid 69654
      LOOPS: 500000
      POINT: file latency.c, line 179 interrupt/schedulling latency, 999.987 Hz, 2000001383 cycles/sec
      PASS:  file latency.c, line 222 latency min = 1.488 usec, avg = 1.678 usec, max = 19.092 usec
      STOP:  ./latency_500000, pid 69654 point=1,pass=1,fail=0,xpass=0,xfail=0,unres=0

   I don't know why BayTrail platform has this issue, but other X86 platform (such as ivyBridge/Haswell/SkyLake) is OK?



_______________________________________________

OSTech
http://community.qnx.com/sf/go/post118152
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
Re: RE: QNX6.5.1/6.6/7.0 has interrupt latency issue on Intel BayTrail platform  
Some ideas to think about:
- IvyBridge and Haswell: Do they have USB 3.0 support at all?
- USB, in general, is very interupt-sensitive, e.g. it causes lots of interrupts, sometimes even in idle state - it is 
enough that a USB hub is present. USB 3.0 may behaving differently than USB 2.0, or the XHCI driver maybe implemented 
differently regarding interrupt handling than ehci driver.
- Check interrupt assignments to PCI bus with USB 3.0 enabled and without. Maybe it's an interrupt sharing issue.
- I dont' have the source of the mentioned latency test program, check how time measurement is implemented. If 
ClockCycles() is being used, you may have run in an rdtsc issue (QNX assumes this counter runs with constant speeds but 
it actually doesn't on some processors, which may mean that the test itself is not accurate). The fact that the issue 
disappears with some fiddeling on USB contradicts this, though.

Regards,
Albrecht
Re: QNX6.5.1/6.6/7.0 has interrupt latency issue on Intel BayTrail platform  
Albrecht Uhlmann schrieb:
> Some ideas to think about:
> - IvyBridge and Haswell: Do they have USB 3.0 support at all?
> - USB, in general, is very interupt-sensitive, e.g. it causes lots of interrupts, sometimes even in idle state - it is
 enough that a USB hub is present. USB 3.0 may behaving differently than USB 2.0, or the XHCI driver maybe implemented 
differently regarding interrupt handling than ehci driver.

That could be the case if the XHCI driver maybe implemented in the same 
stile as the (old?) serial driver ... which does a lot of processing in 
the ISR. At what hardware priority are the XHCI driver and your driver 
working?
> - Check interrupt assignments to PCI bus with USB 3.0 enabled and without. Maybe it's an interrupt sharing issue.
> - I dont' have the source of the mentioned latency test program, check how time measurement is implemented. If 
ClockCycles() is being used, you may have run in an rdtsc issue (QNX assumes this counter runs with constant speeds but 
it actually doesn't on some processors, which may mean that the test itself is not accurate). The fact that the issue 
disappears with some fiddeling on USB contradicts this, though.
>
> Regards,
> Albrecht
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post118154
> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
>

Re: QNX6.5.1/6.6/7.0 has interrupt latency issue on Intel BayTrail platform  
Our ivyBridge/Haswell/SkyLake boards are all have USB 3.0 Controller. 
To BayTrail board & ivyBridge/Haswell/SkyLake boards, the QNX test image is the same, so the xHCI driver also be the 
same.
Attached file " latency_tool_src.zip" is source code for latency tool, 
another file "BayTrail with USB3.0 Enabled Test Report.pdf" is one of our customer test report for our BayTrail board 
with xHCI enabled.
Attachment: Compressed file BayTrail with USB3.0 Enabled Test Report.pdf.zip 216.49 KB Compressed file latency_tool_src.zip 9.42 KB
答复: RE: QNX6.5.1/6.6/7.0 has interrupt latency issue on Intel BayTrail platform  
Our ivyBridge/Haswell/SkyLake boards are all have USB 3.0 Controller. 
To BayTrail board & ivyBridge/Haswell/SkyLake boards, the QNX test image is the same, so the xHCI driver also be the 
same.
Attached file " latency_tool_src.zip" is source code for latency tool, 
another file "BayTrail with USB3.0 Enabled Test Report.pdf" is one of our customer test report for our BayTrail board 
with xHCI enabled.

Best Regards!
John


-----邮件原件-----
发件人: Albrecht Uhlmann [mailto:community-noreply@qnx.com] 
发送时间: 2017年10月27日 21:24
收件人: ostech-core_os
主题: Re: RE: QNX6.5.1/6.6/7.0 has interrupt latency issue on Intel BayTrail platform

Some ideas to think about:
- IvyBridge and Haswell: Do they have USB 3.0 support at all?
- USB, in general, is very interupt-sensitive, e.g. it causes lots of interrupts, sometimes even in idle state - it is 
enough that a USB hub is present. USB 3.0 may behaving differently than USB 2.0, or the XHCI driver maybe implemented 
differently regarding interrupt handling than ehci driver.
- Check interrupt assignments to PCI bus with USB 3.0 enabled and without. Maybe it's an interrupt sharing issue.
- I dont' have the source of the mentioned latency test program, check how time measurement is implemented. If 
ClockCycles() is being used, you may have run in an rdtsc issue (QNX assumes this counter runs with constant speeds but 
it actually doesn't on some processors, which may mean that the test itself is not accurate). The fact that the issue 
disappears with some fiddeling on USB contradicts this, though.

Regards,
Albrecht



_______________________________________________

OSTech
http://community.qnx.com/sf/go/post118154
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
Attachment: Compressed file latency_tool_src.zip 9.42 KB PDF BayTrail with USB3.0 Enabled Test Report.pdf 245.26 KB