Detecting loss of RT in Xenomai

Hi all,

We're interested in detecting unwanted migrations to the Linux domain
in Xenomai using the signal SIGXCPU. What's the best way to add this
feature to our system?
Some ideas we've thought about:
1) Inheriting from Activity and add in OurActivity constructor a call
to rt_task_set_mode(..., T_WARNSW)
2) Patching the Orocos code Xenomai dependent to support that :P

Obviously, the second is very intrusive... but what about the first one?

Detecting loss of RT in Xenomai

On Thu, Jul 2, 2009 at 17:04, Carles Lopez<carles [dot] lopez [..] ...> wrote:
> Hi all,
>
> We're interested in detecting unwanted migrations to the Linux domain
> in Xenomai using the signal SIGXCPU. What's the best way to add this
> feature to our system?

This is bug #183: https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=183

The proposed patch is however very thin. First it should only set the
signal when we configured our thread for ORO_SCHED_RT
(==SCHED_XENOMAI_HARD) and second, it should install a signal handler,
otherwise the application terminates which is very drastic. A signal
handler can do only very little (see man 7 signal), not even a printf.

I'm for such a mechanism, but only if it can be set on a per-thread
basis, preferably at run-time and without core-dumping by default.

Peter

Detecting loss of RT in Xenomai

Hi Carles,

On Thu, Jul 02, 2009 at 05:04:56PM +0200, Carles Lopez wrote:
>
> We're interested in detecting unwanted migrations to the Linux domain
> in Xenomai using the signal SIGXCPU. What's the best way to add this
> feature to our system?
> Some ideas we've thought about:
> 1) Inheriting from Activity and add in OurActivity constructor a call
> to rt_task_set_mode(..., T_WARNSW)
> 2) Patching the Orocos code Xenomai dependent to support that :P
>
> Obviously, the second is very intrusive... but what about the first one?

Good point. I agree that a xenomai-debug type of Activity which gives
access to these specific features would probably be the cleanest way
to do this...

Markus