From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: Xenomai core <Xenomai-core@domain.hid>
Subject: Re: [Xenomai-core] [Xenomai-git] Jan Kiszka : nucleus: Fix interrupt handler tails
Date: Sat, 18 Jun 2011 15:47:56 +0200 [thread overview]
Message-ID: <4DFCAC8C.4050400@domain.hid> (raw)
In-Reply-To: <4DFCAAEA.7010007@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1830 bytes --]
On 2011-06-18 15:40, Gilles Chanteperdrix wrote:
> On 06/18/2011 03:16 PM, Jan Kiszka wrote:
>> On 2011-06-18 15:12, Gilles Chanteperdrix wrote:
>>> On 06/18/2011 03:07 PM, Jan Kiszka wrote:
>>>> On 2011-06-18 14:56, Gilles Chanteperdrix wrote:
>>>>>
>>>>> Maybe in the irq handlers, we should skip the XNHTICK replay, when
>>>>> current_domain is root_domain.
>>>>>
>>>>
>>>> That would be against the purpose of the XNTICK replay (it only targets
>>>> that particular case). And it would still leave us with broken ipipe due
>>>> to enabled IRQs on return from the Xenomai handlers.
>>>
>>> What I mean is that xnintr_clock_handler, we should skip the XNHTICK
>>> replay when the current domain upon return from xnpod_schedule is not
>>> root. From what I understand, this case only happens when xnpod_schedule
>>> migrated the thread, and in that case, the tick will have been forwarded
>>> during xnpod_schedule anyway.
>>
>> In the problematic case, ie. when the XNHTICK replay uses an invalid
>> sched, the current domain is root. It must be root because only then the
>> context could have been migrated to a different CPU by Linux. So this
>> does not help to avoid having to reload sched.
>
> I mean replace:
> if (testbits(sched->lflags, XNHTICK) &&
> xnthread_test_state(sched->curr, XNROOT))
> xnintr_host_tick(sched);
>
> with
> if (!xnarch_root_domain_p() &&
> testbits(sched->lflags, XNHTICK) &&
> xnthread_test_state(sched->curr, XNROOT))
> xnintr_host_tick(sched);
>
That breaks Linux timer ticks: If we are only running the root thread,
where should the pending tick be replayed? It is always deferred, even
over the root domain. And __xnpod_schedule, which could replay it as
well, is only entered if there is rescheduling required.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
next prev parent reply other threads:[~2011-06-18 13:47 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1QXaC2-0007dE-Ar@domain.hid>
2011-06-17 16:53 ` [Xenomai-core] [Xenomai-git] Jan Kiszka : nucleus: Fix interrupt handler tails Gilles Chanteperdrix
2011-06-17 17:03 ` Jan Kiszka
2011-06-17 18:55 ` Gilles Chanteperdrix
2011-06-18 10:21 ` Jan Kiszka
2011-06-18 12:09 ` Gilles Chanteperdrix
2011-06-18 12:10 ` Jan Kiszka
2011-06-18 12:56 ` Gilles Chanteperdrix
2011-06-18 13:07 ` Jan Kiszka
2011-06-18 13:12 ` Gilles Chanteperdrix
2011-06-18 13:16 ` Jan Kiszka
2011-06-18 13:40 ` Gilles Chanteperdrix
2011-06-18 13:47 ` Jan Kiszka [this message]
2011-06-18 14:01 ` Gilles Chanteperdrix
2011-06-18 14:06 ` Jan Kiszka
2011-06-18 15:01 ` Gilles Chanteperdrix
2011-06-18 15:57 ` Jan Kiszka
2011-06-18 13:58 ` Jan Kiszka
2011-06-19 15:41 ` Gilles Chanteperdrix
2011-06-20 16:43 ` Jan Kiszka
2011-06-20 17:33 ` Gilles Chanteperdrix
2011-06-20 19:38 ` Jan Kiszka
2011-06-20 19:41 ` Gilles Chanteperdrix
2011-06-20 19:41 ` Jan Kiszka
2011-06-20 19:51 ` Gilles Chanteperdrix
2011-06-20 20:41 ` Jan Kiszka
2011-06-20 20:52 ` Gilles Chanteperdrix
2011-06-20 21:13 ` Jan Kiszka
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=4DFCAC8C.4050400@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=Xenomai-core@domain.hid \
--cc=gilles.chanteperdrix@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.