From: Philippe Gerum <rpm@xenomai.org>
To: Tschaeche IT-Services <services@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Handling Linux Signals in primary domain context
Date: Tue, 01 Jun 2010 16:32:37 +0200 [thread overview]
Message-ID: <1275402757.27918.151.camel@domain.hid> (raw)
In-Reply-To: <20100601135005.GA5483@domain.hid>
On Tue, 2010-06-01 at 15:50 +0200, Tschaeche IT-Services wrote:
> Hi,
>
> we have the following scenario:
>
> A high priority periodic primary domain task (H), which calls
> rt_task_suspend(L) in each even period and rt_task_resume(L)
> in each odd period on a low priority primary domain task (L).
> L-task consumes all available CPU resources (while(1)).
> Thus, the rest of each cycle (after H has got the CPU) is used
> alternately by L-task, ROOT-task, L-task,...
>
> In our debugging implementation, we send a SIGTRAP to L-task.
> H-task recognizes this by reporting EINTR when calling rt_task_suspend(L).
> But, the while(1) in L-task is not interrupted although there is a SIGTRAP
> pending.
Using SIGTRAP will badly conflict with GDB. Hope this is ok.
>
> Our workaround could be, to send a rt_signal when rt_task_suspend()
> returns EINTR and, then, in the rt-signal handler migrate L-task
> to secondary domain (calling rt_task_set_mode(T_PRIMARY,0))
> initiating the Linux scheduler, which, then, initiates the SIGTRAP handling
> in secondary domain context.
>
> Is there a simpler way to get primary domain tasks interrupted
> by Linux signals? Xenomai already knows about the pending signal
> and, maybe, could initiate the secondary domain switch on a primary scheduler
> event.
Not in the absence of syscall. We thought about this once already, when
considering how a watchdog preempting a runaway task in primary mode
could force a secondary mode switch: there is no sane and easy solution
to this unfortunately.
If the basic idea is about throttling the activity of the L-task, then
you could use the sporadic server policy (enabled via
pthread_setschedparam_ex()).
>
> Thanks,
>
> Olli
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
--
Philippe.
next prev parent reply other threads:[~2010-06-01 14:32 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-01 13:50 [Xenomai-help] Handling Linux Signals in primary domain context Tschaeche IT-Services
2010-06-01 13:52 ` Gilles Chanteperdrix
2010-06-01 13:59 ` Gilles Chanteperdrix
2010-06-01 14:32 ` Philippe Gerum [this message]
2010-06-01 15:54 ` Tschaeche IT-Services
2010-06-01 16:52 ` Tschaeche IT-Services
2010-06-01 16:58 ` Jan Kiszka
2010-06-02 8:36 ` Gilles Chanteperdrix
2010-06-02 9:14 ` Jan Kiszka
2010-06-02 9:15 ` Philippe Gerum
2010-06-02 9:20 ` Jan Kiszka
2010-06-02 9:28 ` Philippe Gerum
2010-06-02 9:37 ` Gilles Chanteperdrix
2010-06-02 10:06 ` Philippe Gerum
2010-06-02 10:19 ` Gilles Chanteperdrix
2010-06-02 10:42 ` Philippe Gerum
2010-06-02 10:51 ` Gilles Chanteperdrix
2010-06-02 10:29 ` Gilles Chanteperdrix
2010-06-02 9:21 ` Gilles Chanteperdrix
2010-06-02 9:23 ` Jan Kiszka
2010-06-02 10:19 ` Tschaeche IT-Services
2010-06-02 10:48 ` Gilles Chanteperdrix
2010-06-02 9:34 ` Philippe Gerum
2010-06-02 9:43 ` Gilles Chanteperdrix
2010-06-02 12:02 ` Daniele Nicolodi
2010-06-02 13:47 ` Gilles Chanteperdrix
2010-06-02 15:14 ` Philippe Gerum
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=1275402757.27918.151.camel@domain.hid \
--to=rpm@xenomai.org \
--cc=services@domain.hid \
--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.