All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve B <sbattazzo@gmail.com>
To: xenomai@xenomai.org
Subject: [Xenomai] POSIX skin, task crashes Linux when run as RT task
Date: Fri, 30 Jan 2015 15:52:49 -0800	[thread overview]
Message-ID: <CAEMXjGyps7NpBUYgC4j4TrVKbiAZsceiuQ71TymDtXz-a3fqbA@mail.gmail.com> (raw)

Hello,

I have a task running at 100Hz on a Beaglebone Black that seems to crash
sporadically when I set its parameters to SCHED_FIFO with any priority, and
it does not produce the crash when I set it to SCHED_OTHER.
However when I set it to SCHED_OTHER the jitter is much larger, so we
really want to get it running stable on SCHED_FIFO if possible.
Jitter is not currently measured precisely, but the difference is such that
it can be eyeballed on an oscilloscope watching the messages go back and
forth.
Looking at /proc/xenomai/stat this task tends to draw up to about 30% of
CPU at full load.

The symptom is that the Linux system becomes largely unresponsive, and the
task still runs and generates occasional printouts.
But it quickly goes from 100Hz (self-measured and reported once every few
seconds) to less than 1Hz and I usually can't kill it off without resetting
the board.

I know that the task is doing quite a lot of mode switches due to
interfacing with hardware that doesn't have an RTDM driver available.
I may be able to bump that part off to a non-RT task triggered with a
pthread_cond_wait or a semaphore or something, but I was sort of planning
to accept the mode switches as long as the timing is still "good enough."

Are there any techniques I can employ to troubleshoot this, or is it a
simple matter of the task being too CPU intensive and starving out Linux,
or that I really need to be getting rid of the mode switches?
Or is it possible that there's a bug in Xenomai that can be dug out from
this?

Cheers,

Steve

             reply	other threads:[~2015-01-30 23:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30 23:52 Steve B [this message]
2015-01-31 10:11 ` [Xenomai] POSIX skin, task crashes Linux when run as RT task Philippe Gerum
2015-02-02 21:12   ` Steve B
2015-02-03 10:19     ` Philippe Gerum
2015-02-03 16:58       ` Steve B
2015-02-04  8:54         ` Philippe Gerum
2015-02-07  0:31       ` Steve B

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=CAEMXjGyps7NpBUYgC4j4TrVKbiAZsceiuQ71TymDtXz-a3fqbA@mail.gmail.com \
    --to=sbattazzo@gmail.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.