Fusion and RT Rreempt [Was: RTAI/fusion 0.7.2]
maxk at qualcomm.com
Wed Jun 1 20:16:15 CEST 2005
Max Krasnyansky wrote:
>>>> I have normally < 3 us on my P4 machine. Under a certain load (which
>>>> corresponds with the one
>>>> that may happen in the environment where the application is supposed
>>>> to work) - networking/disk activity, it's up to ~6-7 us. I have seen
>>>> a few cases of ~15 us, but I have got a suspicion that it's rather
>>>> due to the program's behaviour in particular cases.
>> You guys are probably talking about user-space 'latency' test. That
>> thing uses the timer.
>> Fusion timer code _compensates_ for the jitter and stuff. My test was
>> handling parallel port interrupts in the user-space. There is obviously
>> no compensation of any kind. Timer calibration makes no difference in
>> my case.
>> That's true. This said, my copy of your code reads the final TSC after
>> a couple of outb's and a short delay loop in the interrupt() routine.
>> I don't remember if I did change this code somehow (maybe I did, so
>> bear with me...), but if I did not, it's likely that you measured some
>> extra time here, especially if your test load was punishing the bus
>> with VM pressure. In any case, and when time allows, I'd be interested
>> to know whether this 35 us latency is still experienced with 0.7.2 or
> Ok. I'll run it again when I get a chance.
I ran the test again (left it running for 4 days actually).
Fusion version: CVS snapshot 05/27/2005
Kernel: 2.6.11 adeos-2.6.11-r10
model name : Intel(R) Pentium(R) 4 CPU 1.80GHz
stepping : 2
cpu MHz : 1795.181
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36
clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips : 3555.32
00:00.0 Host bridge: Intel Corp. 82845 845 (Brookdale) Chipset Host Bridge (rev 03)
00:01.0 PCI bridge: Intel Corp. 82845 845 (Brookdale) Chipset AGP Bridge (rev 03)
00:1e.0 PCI bridge: Intel Corp. 82801 PCI Bridge (rev 12)
00:1f.0 ISA bridge: Intel Corp. 82801BA ISA Bridge (LPC) (rev 12)
00:1f.1 IDE interface: Intel Corp. 82801BA IDE U100 (rev 12)
00:1f.2 USB Controller: Intel Corp. 82801BA/BAM USB (Hub #1) (rev 12)
00:1f.4 USB Controller: Intel Corp. 82801BA/BAM USB (Hub #2) (rev 12)
00:1f.5 Multimedia audio controller: Intel Corp. 82801BA/BAM AC'97 Audio (rev 12)
01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev b2)
02:08.0 Ethernet controller: Intel Corp. 82801BA/BAM/CA/CAM Ethernet Controller (rev 03)
Same application: Interrupt on parallel port handled by kernel task. Task saves TSC and
wakes up user-space task via the sema4. User-space task reads TSC and computes the latency.
This time I disabled outb() completely because I don't use oscope any more.
Interrupts are coming in with 4msec interval.
Worst measured latency was 66052 cycles, which is 36794 nsec (36.8 usec).
Running 'latency' test from testsuite gives:
RTS| 2951| 3550| 13571| 0| 00:03:02/00:03:02
Even under heavy disk and network load.
More information about the Rtai