On Tue, Jul 27, 2004 at 02:25:16PM +0200, Philippe Gerum wrote:
> On Tue, 2004-07-27 at 12:12, Marc Kleine-Budde wrote:
> > # dd if=/dev/zero of=/tmp/test
> > nanosleep jitter: min = 10028 ns, max = 113471 ns, avg = 19670201296 ns
> > sema4 handshake: min = 2080 ns, max = 57584 ns, avg = 11123 ns

> Likely because you are not measuring the same thing as LXRT/latency
> does. The current POSIX skin nanosleep() implementation is bound to a
> _periodic_ nucleus watchdog that expresses time in ticks (this happens
> even if the nucleus is asked to use the timer hardware in one-shot mode;
> this is not related here), so your delay is always rounded to the next
> tick. What you see is not a jitter, but a loss of timing accuracy caused
> by the way the skin waits for the next wakeup time.

Hmm - I don't see where the rounding occurs.
A difference we've found is, that 'xnpod_set_thread_periodic' programms
the 'thread->ptimer' and xnpod_delay the '&thread->rtimer'. Using
xnpod_delay causes a bit more overhead since the timer has to be
reprogrammed for every nanosleep. 

> If you want to compare fusion with LXRT, use the testsuite/latency test,
> it has been crafted exactely for that. On my 1Ghz laptop,  your "dd"
> test gives the following, which is rather correct:

> min = 4130 ns, max = 46003 ns, avg = 4908 ns, overrun = 0
> min = 4130 ns, max = 46003 ns, avg = 4900 ns, overrun = 0
> min = 4130 ns, max = 46003 ns, avg = 4909 ns, overrun = 0
> min = 4130 ns, max = 46003 ns, avg = 4904 ns, overrun = 0
> min = 4130 ns, max = 46003 ns, avg = 4910 ns, overrun = 0
> min = 4130 ns, max = 46003 ns, avg = 4905 ns, overrun = 0
> min = 4130 ns, max = 46003 ns, avg = 4912 ns, overrun = 0
> min = 4130 ns, max = 46003 ns, avg = 4910 ns, overrun = 0

here:

min = 5185 ns, max = 79593 ns, avg = 10617 ns, overrun = 0
min = 5185 ns, max = 79593 ns, avg = 10797 ns, overrun = 0
min = 5185 ns, max = 79593 ns, avg = 11028 ns, overrun = 0
min = 5185 ns, max = 79593 ns, avg = 10979 ns, overrun = 0
min = 5185 ns, max = 79593 ns, avg = 9906 ns, overrun = 0
min = 5185 ns, max = 79593 ns, avg = 9144 ns, overrun = 0
min = 5185 ns, max = 79593 ns, avg = 11602 ns, overrun = 0

But with the original lxrt, we've still a third (~20us) max.

Marc
-- 
#!/bin/sh
set - `type $0` 'tr "[a-zA-Z]" "[n-za-mN-ZA-M]"';while [ "$2" != "" ];do \
shift;done; echo 'frq -a -rc '`echo "$0"| $1 `'>$UBZR/.`rpub signature|'`\
echo $1|$1`'`;rpub "Jr ner fvtangher bs obet. Erfvfgnapr vf shgvyr!"'|$1|sh

Reply via email to