From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Philippe Gerum <rpm@xenomai.org>
Cc: Jan Kiszka <jan.kiszka@siemens.com>, Xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] RTDM syscalls & switching
Date: Tue, 14 Jun 2016 22:35:41 +0200 [thread overview]
Message-ID: <20160614203541.GK23680@hermes.click-hack.org> (raw)
In-Reply-To: <20385615-283a-9d68-0203-a2a834d0b97f@xenomai.org>
On Tue, Jun 14, 2016 at 10:11:30PM +0200, Philippe Gerum wrote:
> On 06/14/2016 07:13 PM, Jan Kiszka wrote:
> > On 2016-06-14 17:23, Philippe Gerum wrote:
> >> Restoring the original behavior unconditionally would not be a fix but
> >> only a work-around for your own issue. Finding a better way acceptable
> >> to all parties is on my todo list for the upcoming 3.0.3.
> >
> > An alternative design to a plain revert of the current->conforming
> > switch could be to enhance conforming to take the scheduling class into
> > account: SCHED_WEAK and SCHED_OTHER should have a NRT as conforming
> > domain while real-time scheduling classes obviously target RT. But I
> > didn't check yet what side effects that may have, nor if there could be
> > relevant impact on syscall performance (unlikely, though).
> >
>
> That would not make more sense: SCHED_WEAK/OTHER is about having
> _Xenomai_ threads interfacing with the _Xenomai_ system, without
> competing with real-time threads priority-wise. But this is still about
> running Xenomai services, for synchronizing on real-time events or
> receiving messages from the real-time side. Basically, this requires to
> run from primary mode.
>
> We need a scheme that:
>
> - does not allow user-space to select the RTDM handler being called only
> by manipulating its runtime mode, because this would certainly lead to a
> massive mess for the application.
>
> - does not ask the driver to deal with mode detection on each and every
> (ioctl) request it implements. With the conforming mode applicable to
> all RTDM I/O calls, only the _rt side should return ENOSYS to hand over
> some requests to the nrt side. When a request cannot be processed from
> nrt, then we know the request is wrong/invalid, returning ENOSYS makes
> no sense.
>
> - possibly restrict the former "current" behavior to some ioctl() calls,
> as specified by the driver, not decided by the application.
I am not sure I have already proposed that, but I am going to try,
sorry if this is the second time. Since RTDM file descriptors are
plain Linux file descriptors, could not the ioctl callback of these
plain linux file descriptors give access to the ioctl_nrt RTDM
callback? This way, in the case which is a problem for Jan, he could
call __real_ioctl and be done with it.
The fact that __real is not portable is not really an issue, you can
wrap that in a macro that adds __real or not like the __RT macro
does.
--
Gilles.
https://click-hack.org
next prev parent reply other threads:[~2016-06-14 20:35 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-12 16:06 [Xenomai] RTDM syscalls & switching Jan Kiszka
2016-05-12 16:31 ` Gilles Chanteperdrix
2016-05-12 16:50 ` Jan Kiszka
2016-05-12 16:59 ` Gilles Chanteperdrix
2016-05-12 17:12 ` Gilles Chanteperdrix
2016-05-12 17:17 ` Jan Kiszka
2016-05-12 18:20 ` Gilles Chanteperdrix
2016-05-12 18:24 ` Jan Kiszka
2016-05-12 18:30 ` Gilles Chanteperdrix
2016-05-12 18:33 ` Jan Kiszka
2016-05-12 18:35 ` Philippe Gerum
2016-05-12 18:42 ` Jan Kiszka
2016-05-12 19:08 ` Philippe Gerum
2016-05-12 19:27 ` Jan Kiszka
2016-05-12 19:47 ` Gilles Chanteperdrix
2016-05-12 22:26 ` Philippe Gerum
2016-05-13 5:54 ` Jan Kiszka
2016-05-13 13:38 ` Philippe Gerum
2016-05-13 15:32 ` Jan Kiszka
2016-06-14 15:09 ` Jan Kiszka
2016-06-14 15:23 ` Philippe Gerum
2016-06-14 15:27 ` Jan Kiszka
2016-06-14 15:38 ` Gilles Chanteperdrix
2016-06-14 15:43 ` Jan Kiszka
2016-06-14 15:51 ` Gilles Chanteperdrix
2016-06-14 16:03 ` Jan Kiszka
2016-06-14 16:12 ` Gilles Chanteperdrix
2016-06-14 16:25 ` Jan Kiszka
2016-06-14 16:42 ` Gilles Chanteperdrix
2016-06-14 16:59 ` Jan Kiszka
2016-06-14 22:12 ` Gilles Chanteperdrix
2016-06-14 15:47 ` Jan Kiszka
2016-06-14 19:48 ` Philippe Gerum
2016-06-14 20:03 ` Jan Kiszka
2016-06-14 20:13 ` Philippe Gerum
2016-06-14 17:13 ` Jan Kiszka
2016-06-14 20:11 ` Philippe Gerum
2016-06-14 20:35 ` Gilles Chanteperdrix [this message]
2016-05-12 19:11 ` Gilles Chanteperdrix
2016-05-12 19:31 ` Jan Kiszka
2016-05-12 19:39 ` Gilles Chanteperdrix
2016-05-12 17:14 ` Jan Kiszka
2016-05-12 17:38 ` Philippe Gerum
2016-05-12 17:51 ` Jan Kiszka
2016-05-12 18:22 ` Gilles Chanteperdrix
2016-05-12 18:31 ` 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=20160614203541.GK23680@hermes.click-hack.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=jan.kiszka@siemens.com \
--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.