I'm sorry to disappoint you Michael, but I've just tested it for the fun
of it and do_gettimeofday is very much broken in rtl2.3. I don't know
about anything later, but it's definitely broken it 2.3. Here's how I
know:
I've applied the 2.3 patch on a vanilla 2.2.14 and then applied the
LTT patch available with release 0.9.2 (www.opersys.com/LTT). The
patch complains a bit, but the patch is applied correctly nonetheless
(I checked the code).
You can then trace the system as usual (note that this only means that
you can observe Linux, LTT knows nothing of RTL). With the frank example
I get the following sequence of events:
IRQ entry (967220914, 563863) 0 7 IRQ : 0, IN-KERNEL
IRQ exit (967220914, 573866) 0 6
Bottom half (967220914, 573868) 0 7 BH : 0
Kernel timer (967220914, 573870) 0 6
IRQ entry (967220914, 571371) 0 7 IRQ : 0, IN-KERNEL
IRQ exit (967220914, 581373) 0 6
Bottom half (967220914, 581375) 0 7 BH : 0
Notice that the second IRQ's time-stamp which is obtained using do_gettimeofday
precedes the time-stamp of the previous event. Hmm...
This is the same problem that used to happen with RTAI.
Now LTT doesn't do any magic here, it only calls on do_gettimeofday to
time-stamp things. This means that anything calling on do_gettimeofday in
and around said IRQ entry will have some problems. Notice also that the
timer handler seems to have taken 10ms to take care of the interrupt,
which is totally absurd (it's actually a problem with lost_ticks).
Of course, the underlying presumption is that no hard RT task will be
calling on do_gettimeoday. I must confess, though, the previous sequence of
events seems troubling to me.
The code I've posted fixes this stuff AND enables hard RT tasks to call
on do_gettimeofday without a problem.
Best regards
Karim
===================================================
Karim Yaghmour
[EMAIL PROTECTED]
Operating System Consultant
(Linux kernel, real-time and distributed systems)
===================================================
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/