From: Tschaeche IT-Services <services@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-help] Forcing a task to run in secondary mode if no RT resources are acquired
Date: Thu, 5 Aug 2010 16:51:11 +0200 [thread overview]
Message-ID: <20100805145111.GB22855@domain.hid> (raw)
In-Reply-To: <4BE983C0.9010909@domain.hid>
Hi,
On Tue, May 11, 2010 at 06:20:16PM +0200, Jan Kiszka wrote:
> > 1. When Cyclic-/Background-task acquires an RT-mutex it migrates
> > from Linux to Xenomai scheduler. When releasing the mutex,
> > the task should be forced to migrate back to Linux scheduler.
> >
> > How to achieve that?
> >
> > By calling Linux-Syscall getpid()?
>
> That's the workaround for now, true solution is not yet available
> (Philippe is on it).
> >
> > Is there a Xenomai flag (rt_task_set_mode()) doing that automatically,
> > after all RT-resources are released? Which version 2.4.10/2.5.x?
> >
> > Do we have to use the patch mentioned in the thread?
>
> That patch is targeting the (now unsupported) 2.4 series. The official
> solution will be for 2.5.x or some 2.6.x.
What we need is a background task running in secondary domain which is able to claim
rt-resources (e.g. xenomai mutices, for synchonisation with RT tasks sending data).
While it's holding maybe multiple resources it should run in primary domain, but when releasing
the last rt resource it should automatically migrate back to secondary domain.
At the moment our solution for that problem would be to hook into each claim/release
function of Xenomai, add a list management to monitor the release of the last resource,
and, if the task does not hold any resource anymore, call a Linux syscall to force migration
to Linux domain.
We would appreciate a proper solution into Xenomai, since Xenomai seems to do
the same in the kernel structures. If we decide to start to patch Xenomai,
we would like to have our changes integrated into Xenomai.
Can you give us a hint to docs for a good starting point (apart from the patch
mentioned above)?
Regards,
Olli
next prev parent reply other threads:[~2010-08-05 14:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-11 14:26 [Xenomai-help] Scheduling clarification/solution Tschaeche IT-Services
2010-05-11 16:20 ` Jan Kiszka
2010-08-05 14:51 ` Tschaeche IT-Services [this message]
2010-05-11 19:09 ` 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=20100805145111.GB22855@domain.hid \
--to=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.