From: "Luis Claudio R. Goncalves" <lclaudio@uudg.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Denis Richard <denis.richard@alcatel-lucent.fr>,
linux-rt-users@vger.kernel.org
Subject: Re: SCHED_RR preempted by SCHED_OTHER
Date: Mon, 27 Jul 2009 10:16:45 -0300 [thread overview]
Message-ID: <20090727131645.GL23932@unix.sh> (raw)
In-Reply-To: <20090727123609.GA26176@pengutronix.de>
On Mon, Jul 27, 2009 at 02:36:09PM +0200, Uwe Kleine-König wrote:
| On Mon, Jul 27, 2009 at 01:57:31PM +0200, Denis Richard wrote:
| > Hi all,
| > We work on powerpc board with kernel 2.6.29.6-rt23.
| > The kernel is configured with "Complete Preemption (Real-Time)".
| > Working on our software, we have a strange behavior.
| > A real time thread (SCHED_RR) can be preempted by non real time one
| > (SCHED_OTHER).
| >
| > We wrote a little test program (at the end of this mail).
| > This program creates 2 threads, a SCHED_RR one which processes during
| > about 12s
| > (long for a real time, but just for test), and a SCHED_OTHER one,
| > started after the first one,
| > which just modifies a global variable. The second one should not run
| > during the execution of
| > the first one. But it appends, the global variable is modified.
| >
| > > rr_other
| > Create thread
| > OTHER ran during RR
| > The end
| > >
| >
| > Is it normal, a non real time thread preempts a real time one ? (we
| > think, it is not)
| > Or is there something wrong in the test program, the kernel
| > configuration, ... ?
| Does
|
| # echo -1 > /proc/sys/kernel/sched_rt_runtime_us
|
| help?
Also be prepared to find a WARNING on the kernel logs as the kernel gets
worried everytime a CPU runs the same process for more than 10s.
If Uwe's suggestion doesn't solve the issue, you may want to run the
sched_switch tracer from ftrace. Steven Rostedt recently posted a userspace
application to make this task easier.
Have fun,
Luis
--
[ Luis Claudio R. Goncalves Bass - Gospel - RT ]
[ Fingerprint: 4FDD B8C4 3C59 34BD 8BE9 2696 7203 D980 A448 C8F8 ]
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-07-27 13:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-27 11:57 SCHED_RR preempted by SCHED_OTHER Denis Richard
2009-07-27 12:36 ` Uwe Kleine-König
2009-07-27 13:16 ` Luis Claudio R. Goncalves [this message]
2009-07-27 13:31 ` Denis Richard
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=20090727131645.GL23932@unix.sh \
--to=lclaudio@uudg.org \
--cc=denis.richard@alcatel-lucent.fr \
--cc=linux-rt-users@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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.