From: Daniel Bristot de Oliveira <daniel@bristot.me>
To: Julio Cruz Barroso <julio.cruz@smartmatic.com>,
"linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>
Subject: Re: cyclictest versus custom SPI based system
Date: Wed, 13 Jan 2016 16:36:30 -0200 [thread overview]
Message-ID: <5696992E.703@bristot.me> (raw)
In-Reply-To: <AF04265A3FC2B144B9892F621A394E13D5C0B43F@tethys>
On 01/13/2016 03:06 PM, Julio Cruz Barroso wrote:
> This could be related with the priority of the SPI (spi0)?
In this case the thread spi0 has PRI of 20 with a nice of 0 [3].
Hi Julio,
You must run SPI's IRQ thread on a real-time policy:priority. For
instance, chrt -p -f 50 $(pidof spi0).
I used work with an ARM processor running kernel-rt on both master and
slave side of a SPI bus, and it worked fine when using threaded IRQ.
If you continue facing long latencies, you can use the (big hammer)
IRQF_NO_THREAD flag on SPI's IRQ handler registry. This will force the
SPI handler to run as a traditional - non threaded - IRQ handler.
I did it on a very special case of a 200MHz ARM running kernel-rt on the
slave side of a SPI bus. As it was on the slave side, any additional
overhead (like the scheduling overhead of the threaded handler) was
impacting on master's side performance, that was a very busy DSP (ADBF
@500Mhz). It worked fine! But the SPI's IRQ was the "highest priority"
task, on a very controlled env.
-- Daniel
next prev parent reply other threads:[~2016-01-13 18:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 17:06 cyclictest versus custom SPI based system Julio Cruz Barroso
2016-01-13 18:36 ` Daniel Bristot de Oliveira [this message]
2016-01-14 8:11 ` Julio Cruz Barroso
2016-01-15 11:31 ` Grygorii Strashko
2016-01-15 11:45 ` Julio Cruz Barroso
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=5696992E.703@bristot.me \
--to=daniel@bristot.me \
--cc=julio.cruz@smartmatic.com \
--cc=linux-rt-users@vger.kernel.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.