From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: "Zemskov, Evgeny" <Evgeny.Zemskov@transas.com>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] Would a Xenomai thread running in secondary mode affect the latencies of other Xenomai threads in primary modes ?
Date: Tue, 12 Feb 2013 13:45:34 +0100 [thread overview]
Message-ID: <511A396E.2060703@xenomai.org> (raw)
In-Reply-To: <FA4CEC4EBE2FA145A7663764A1CCB31E5C4C8FF3@VOITV-EXCH-BE01.transas.com>
On 02/12/2013 01:33 PM, Zemskov, Evgeny wrote:
> Good evening !
>
> We're developing a system with bunch of Xenomai threads, one of which writes
> the data to some specific device (MIL-STD-1553B bus controller).
>
> RTDM drivers for this device are not available, and we want to avoid porting
> them to RTDM.
> Since we don't need to wait for any interrupts from this device (we init the
> transmission with some ioctl's which write to the registers of the device and
> write the data being tarnsmitted with __copy_from_user), we've tried to use
> standard Linux drived from Xenomai thread.
> Naturally, on each transmission, the transmitting Xenomai thread switches to
> the secondary mode, but the resulting latency is perfectly OK for us (we
> estimate it at around 50..100 usec).
You probably should not expect a bounded latency from Linux.
>
> Would such approach cause extra latencies to other Xenomai threads, which run
> simultaneously in primary mode ?
If you enable CONFIG_XENO_OPT_PRIOCPL and the task running in secondary
mode has a higher priority than other Xenomai threads, then yes.
Otherwise no.
> Also, would there be any problems with constant switches of our writer thread
> between primary and secondary mode ?
It depends on your definition of "problems":
- such a task can not be considered a real-time task
- and the constant switches induces a bit of CPU consumption.
> As far as I understand, on each register access it is switched to secondary
> mode, and on each rt_cond_wait it goes back to primary mode.
You understand right.
--
Gilles.
next prev parent reply other threads:[~2013-02-12 12:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <FA4CEC4EBE2FA145A7663764A1CCB31E5C4C8FBB@VOITV-EXCH-BE01.transas.com>
2013-02-12 12:33 ` [Xenomai] Would a Xenomai thread running in secondary mode affect the latencies of other Xenomai threads in primary modes ? Zemskov, Evgeny
2013-02-12 12:45 ` Gilles Chanteperdrix [this message]
2013-02-15 11:09 ` Zemskov, Evgeny
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=511A396E.2060703@xenomai.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=Evgeny.Zemskov@transas.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.