From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: Xenomai core <Xenomai-core@domain.hid>
Subject: Re: [Xenomai-core] [RFC][PATCH] nucleus: Prevent rescheduling while in xntbase_tick
Date: Fri, 17 Jun 2011 14:12:39 +0200 [thread overview]
Message-ID: <1308312759.2270.34.camel@domain.hid> (raw)
In-Reply-To: <4DFB4455.7050809@domain.hid>
On Fri, 2011-06-17 at 14:11 +0200, Jan Kiszka wrote:
> On 2011-06-17 13:58, Philippe Gerum wrote:
> > On Fri, 2011-06-17 at 13:03 +0200, Jan Kiszka wrote:
> >> On 2011-06-17 12:58, Gilles Chanteperdrix wrote:
> >>> On 06/17/2011 11:27 AM, Jan Kiszka wrote:
> >>>> Based on code inspection, it looks like a timer handler triggering a
> >>>> reschedule in the path xntbase_tick -> xntimer_tick_aperiodic /
> >>>> xntimer_tick_periodic_inner -> handler can cause problems, e.g. a
> >>>> reschedule before all expired timers were processed. The timer core is
> >>>> usually run atomically from an interrupt handler, so better emulate an
> >>>> IRQ context inside xntbase_tick by setting XNINIRQ.
> >>>
> >>> I do not understand this one either: if we are inside
> >>> xntimer_tick_aperiodic, XNINIRQ is already set.
> >>
> >> Not if you come via xntbase_tick, called by the mentioned skins also
> >> outside a timer IRQ (at least based on my understanding of that skin
> >> APIs). But I might be wrong, I just came across this while checking for
> >> potentially invalid cached xnpod_current_sched values.
> >
> > That is ok, ui_timer(), tickAnnounce() and tm_tick() are designed by the
> > respective RTOS to be called from IRQ context.
>
> Fine. Should we add a XENO_ASSERT to set this in stone and for
> documentation purposes?
I think so.
>
> Jan
>
--
Philippe.
prev parent reply other threads:[~2011-06-17 12:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-17 9:27 [Xenomai-core] [RFC][PATCH] nucleus: Prevent rescheduling while in xntbase_tick Jan Kiszka
2011-06-17 10:58 ` Gilles Chanteperdrix
2011-06-17 11:03 ` Jan Kiszka
2011-06-17 11:58 ` Philippe Gerum
2011-06-17 12:11 ` Jan Kiszka
2011-06-17 12:12 ` Philippe Gerum [this message]
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=1308312759.2270.34.camel@domain.hid \
--to=rpm@xenomai.org \
--cc=Xenomai-core@domain.hid \
--cc=jan.kiszka@domain.hid \
/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.