From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Beginner's question / testsuite / latency
Date: Mon, 31 Jul 2006 00:00:38 +0200 [thread overview]
Message-ID: <44CD2C06.1070100@domain.hid> (raw)
In-Reply-To: <17613.4212.23333.832165@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1951 bytes --]
Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
> > Philippe Gerum wrote:
> > > On Sat, 2006-07-29 at 16:20 +0200, Jan Kiszka wrote:
> > >>>> :|func 6 xnintr_clock_handler (__ipipe_dispatch_wired)
> > >>>> :|func 6 xnintr_irq_handler (xnintr_clock_handler)
> > >>>> :|func 7 xnpod_announce_tick (xnintr_irq_handler)
> > >>>> :|func 8+ xntimer_do_tick_aperiodic (xnpod_announce_tick)
> > >>>> :|func 9 xnthread_periodic_handler (xntimer_do_tick_aperiodic)
> > >>>> :|func 10 xnpod_resume_thread (xnthread_periodic_handler)
> > >>>> :|[21559] 11+ xnpod_resume_thread (xnthread_periodic_handler)
> > >>>> :|func 13+ xnthread_periodic_handler (xntimer_do_tick_aperiodic)
> > >> ...
> > >>
> > >>>> :|func 363+ xnthread_periodic_handler (xntimer_do_tick_aperiodic)
> > >> That are a lot of overruns. Haven't counted, but it should be one
> > >> xnthread_periodic_handler per missed 100 us period (20000 / 100 = 200!).
> > >> [BTW, I think we should handle even this failure scenario without
> > >> looping.
> > >
> > > We need to loop in the aperiodic handler in order to catch timers that
> > > could have elapsed while processing the current tick. However,
> >
> > No, that was not what I meant. I know that we need the timer loop. But I
> > was thinking of something like this for the tick handler's error path:
> >
> > if (unlikely((timer.date += timer.interval) < now))
> > timer.date = now + timer.interval -
> > (now - timer.date) % timer.interval;
>
> Actually,
>
> while (timer.date < now)
> timer.date += timer.interval
>
> cost much less cycles in the normal/fast case than going through a
> division...
>
Yeah, most probably the right way for the timer IRQ. If we have to loop
here significantly often, then we already had a much too long IRQ-off
period and are toasted anyway.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2006-07-30 22:00 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-20 21:17 [Xenomai-help] Beginner's question / testsuite / latency Julien Heyman
2006-07-20 21:58 ` Jan Kiszka
2006-07-22 9:52 ` Julien Heyman
2006-07-22 17:17 ` Jan Kiszka
2006-07-28 21:17 ` Julien Heyman
2006-07-28 21:32 ` Gilles Chanteperdrix
2006-07-30 17:29 ` Julien Heyman
2006-07-30 17:49 ` Philippe Gerum
2006-07-30 20:39 ` Gilles Chanteperdrix
2006-07-29 14:20 ` Jan Kiszka
2006-07-30 17:36 ` Julien Heyman
2006-07-30 18:03 ` Philippe Gerum
2006-07-30 19:33 ` Jan Kiszka
2006-07-30 20:03 ` Gilles Chanteperdrix
2006-07-30 22:00 ` Jan Kiszka [this message]
2006-07-30 21:23 ` Philippe Gerum
2006-07-30 22:00 ` Jan Kiszka
2006-07-31 9:57 ` Philippe Gerum
2006-07-31 11:39 ` Gilles Chanteperdrix
2006-07-31 14:19 ` Philippe Gerum
2006-07-31 20:49 ` Julien Heyman
2006-08-01 13:13 ` Gilles Chanteperdrix
2006-08-01 13:38 ` Philippe Gerum
2006-08-01 14:30 ` Philippe Gerum
2006-08-01 14:45 ` [Xenomai-core] [RFC] tame the watchdog (was: Beginner's question / testsuite / latency) Jan Kiszka
2006-08-02 8:52 ` [Xenomai-core] " Philippe Gerum
2006-08-02 11:04 ` [Xenomai-core] Re: [RFC] tame the watchdog Jan Kiszka
2006-07-21 13:25 ` [Xenomai-help] Beginner's question / testsuite / latency Gilles Chanteperdrix
2006-07-22 9:58 ` Julien Heyman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44CD2C06.1070100@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.