Re: PREEMPT_RT vs IPIPE: the numbers, part 2
From: Karim Yaghmour
Date: Wed Jun 22 2005  15:12:28 EST
Ingo Molnar wrote:
> with lpptest (PREEMPT_RT's builtin parallelport latency driver) that's
> possible, as it polls the target with interrupts disabled, eliminating
> much of the loggerside latencies. The main effect is that it's now only
> a single worstcase latency that is measured, instead of having to have
> two worstcases meet.
>
> Here's a rough calculation to show what the stakes are: if there's a
> 1:100000 chance to trigger a worstcase irq handling latency, and you
> have 600000 samples, then with lpptest you'll see an average of 6 events
> during the measurement. With lrtfb (the one Karim used) the chance to
> see both of these worstcase latencies on both sides of the measurement
> is 1:10000000000, and you'd see 0.00006 of them during the measurement.
> I.e. the chances of seeing the true max latency are pretty slim.
If indeed there are 6 events on a singleside which are worstcase,
then you would have to also factor in the probability of obtaining
an average or below average result on the other side. So again, if
all runs were measuring average on each side, one would expect that
at least one of the runs would have a bump over the 55us mark. Yet,
they all have the same maximum.
Here's an overview of the results spread in the case of IRQ latency
measurements in the HD case (this is just a view of one case, a
true study would require drawing graphs showing the spread for all
tests):
Of 833,000 results for PREEMPT_RT:
 36 values are above 50us (0.0045% or 4.5/100,000)
 860 values are 19us and above
Of 781,000 results for IPIPE:
 213 values are above 50us (0.0273% or 27/100,000)
 311 values are 19us and above
Contrary to the illustration you make above, it would seem that the
fact that both machines are running the same mechanism, the
bluemoon effect multiplies upward instead of downward. This,
though, is but a preliminary analysis.
Notes:
 Below 19us, the number of measurement points increases for both
setups as we get closer to the 14us average mark.
 There are more data points for PREEMPT_RT than ipipe because
LMbench takes much more time to complete on the former.
> So if you want to reliably measure worstcase latencies in your expected
> lifetime, you truly never want to serially couple the probabilities of
> worstcase latencies on the target and the logger side.
Like I said, we're going to settle this one to avoid any further
doubts.
Karim

Author, Speaker, Developer, Consultant
Pushing Embedded and RealTime Linux Systems Beyond the Limits
http://www.opersys.com  karim@xxxxxxxxxxx  18666774546

To unsubscribe from this list: send the line "unsubscribe linuxkernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomoinfo.html
Please read the FAQ at http://www.tux.org/lkml/