All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] libalchemy: failing test case task-5
Date: Wed, 25 Sep 2013 09:29:16 +0200	[thread overview]
Message-ID: <524290CC.8000705@xenomai.org> (raw)
In-Reply-To: <5241DAB0.8000604@siemens.com>

On 09/24/2013 08:32 PM, Jan Kiszka wrote:
> Hi,
>
> I played a bit with the native skin emulation in Xenomai 3. The shipped
> test cases in lib/alchemy/testsuite point a problem:
> rt_task_set_priority is no longer a pure real-time services. As it calls
> libc's pthread_setschedparam internally, it will - at least briefly -
> switch the caller to secondary mode. This break the task-5 test which
> assumes a different behaviour.
>
> Are there ideas/plans to address this issues?

The switch to secondary mode will remain, the 2.6 implementation is even 
worse actually. We have to keep both schedulers in sync, and for that, 
the glibc has to be notified about the policy/priority change as well. 
In 2.6, the target thread would receive a SIGSHADOW notification, 
causing it to switch to secondary mode, while the setschedparam caller 
would remain in primary mode. With 3.x, this is reversed: the thread 
which issues the request does the switch, but the target thread whose 
priority/policy was changed does not.

At the very least, this behavior is much saner, since the issuer has to 
be aware of the consequences of its request, and the target thread won't 
move to secondary in a random fashion with respect to its code flow. In 
addition, this lifts a potential deadlock situation, as 
pthread_setschedparm is not async-safe, so running it over a SHIGSHADOW 
handler is not that safe.

Are there more case known
> where the new architecture provides some challenges when trying to
> preserve original API semantics?
>

All user-visible changes are tracked in an internal document here. I'll 
publish it right after the Cobalt/POSIX extension model with Xenomai 3 
is fully validated, since this might have a few implications more.

-- 
Philippe.


      reply	other threads:[~2013-09-25  7:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-24 18:32 [Xenomai] libalchemy: failing test case task-5 Jan Kiszka
2013-09-25  7:29 ` 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=524290CC.8000705@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=jan.kiszka@siemens.com \
    --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.