From: Jan Kiszka <jan.kiszka@domain.hid>
To: Philippe Gerum <rpm@xenomai.org>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Policy switching and XNOTHER maintenance
Date: Sun, 11 Sep 2011 13:49:32 +0200 [thread overview]
Message-ID: <4E6CA04C.7050503@domain.hid> (raw)
In-Reply-To: <4E6C927F.3070901@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]
On 2011-09-11 12:50, Jan Kiszka wrote:
> Hi all,
>
> just looked into the hrescnt issue again, specifically the corner case
> of a shadow thread switching from real-time policy to SCHED_OTHER.
>
> Looks like we don't support this at all ATM:
>
> do_setsched_event ignores events that enabled SCHED_OTHER, and the
> XNOTHER flag is only set on xnshadow_map, not updated anywhere else.
> Fixing this is not straightforward as that flag resides in a state
> variable that is owned by the thread (ie. updated non-atomically) while
> do_setsched_event can also be called over different contexts.
OK, it just takes nklock to update the thread state.
>
> Or am I missing something?
From __xnpod_set_thread_schedparam:
"A non-real-time shadow may upgrade to real-time FIFO
scheduling, but the latter may never downgrade to
SCHED_NORMAL Xenomai-wise. In the valid case, we clear
XNOTHER to reflect the change."
What prevents us from setting XNOTHER if the priority drops to 0, i.e.
the Linux task re-enters SCHED_NORMAL (while Xenomai will still schedule
it via its RT class of course)? We cannot deny such a transition on the
Linux side anyway, can we?
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2011-09-11 11:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-11 10:50 [Xenomai-core] Policy switching and XNOTHER maintenance Jan Kiszka
2011-09-11 11:49 ` Jan Kiszka [this message]
2011-09-11 14:24 ` Gilles Chanteperdrix
2011-09-11 14:29 ` Jan Kiszka
2011-09-16 20:13 ` Gilles Chanteperdrix
2011-09-16 20:39 ` Gilles Chanteperdrix
2011-09-18 14:02 ` Philippe Gerum
2011-09-18 14:34 ` Jan Kiszka
2011-09-18 15:10 ` Philippe Gerum
2011-09-18 15:11 ` Jan Kiszka
2011-09-18 15:13 ` Jan Kiszka
2011-09-18 15:18 ` Gilles Chanteperdrix
2011-09-18 15:24 ` Jan Kiszka
2011-09-18 15:47 ` Gilles Chanteperdrix
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=4E6CA04C.7050503@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=rpm@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.