From: Jan Kiszka <jan.kiszka@domain.hid>
To: "\"Schlägl \\\"Manfred jun.\\\"\"" <manfred.schlaegl@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Generel problem with realtime-tops(like adeos) over linux-kernel
Date: Thu, 17 Jul 2008 11:14:44 +0200 [thread overview]
Message-ID: <487F0D84.8010705@domain.hid> (raw)
In-Reply-To: <1216282324.3472.29.camel@domain.hid>
Schlägl Manfred jun. wrote:
> Hi!
>
> I think we've discovered a generell logical problem with realtime-tops
> like adeos over the linux-kernel.
>
> The basic-assumption of such an system is: Linux is not a
> realtime-system, so it is not able to provide realtime to it's services,
> so no linux-service is able to use realtime-capabilities, so no
> linux-service has realtime-requirements.
>>From this it follows that we are able use a top like adeos (send
> interrupts later, always interrupt the linux-kernel).
>
> But... Linux is able to provide hard-realtime while interrupts are
> locked. And many services(driver) use this.
>
> abstract example:
> {{{
> spin_lock_irqsave
> if(hardware_data_valid())
> process_hardware_data()
> spin_lock_irqrestore
> }}}
> works fine without adeos, but with adeos there may be a relative long
> interruption between validation and processing. The hardware may overrun
> and process_hardware_data is called without valid data...
For those rare cases (compared to the mass of locks that don't need
this), you can still convert the lock into a hard one again. See e.g.
how IRQ controllers (which are shared between Linux and other Adeos
domains) are handled by the I-pipe patch, watching out for
ipipe_spinlock_t specifically.
>
> In our case we have this problem while the rx-interrupt of our
> ethernet-driver. The dma is running permanently and generates an overrun
> between the error-checking(which would catch the overrun) part and the
> data-processing part of the handler.
>
> I think it is possible that there could be many such (latent) problems
> in linux-kernel. For example USB which itself has realtime-requirements,
> or eventually mtd (lost data as cause of wrong flash-write/erase
> timings), ...
>
> So ... what do you think about that.
Most hardware does not have such hard requirements. IIRC, USB does not.
Also note that long hard IRQ-off phases are highly disliked in mainline
Linux as well, and kernel developers will happily accept sound patches
avoiding such phases. This also simplifies the path toward PREEMPT_RT
(which effectively does the same to these locks that Adeos does).
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2008-07-17 9:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-17 8:12 [Xenomai-help] Generel problem with realtime-tops(like adeos) over linux-kernel Schlägl Manfred jun.
2008-07-17 9:14 ` Jan Kiszka [this message]
2008-07-18 8:02 ` Philippe Gerum
2008-07-19 7:27 ` 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=487F0D84.8010705@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=manfred.schlaegl@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.