From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jeremy Friesner <jaf@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Linux scheduling question
Date: Fri, 09 Sep 2011 21:40:48 +0200 [thread overview]
Message-ID: <4E6A6BC0.4080308@domain.hid> (raw)
In-Reply-To: <BE5655A7-935E-4ABC-8D95-188D7D00C125@domain.hid>
On 09/09/2011 09:08 PM, Jeremy Friesner wrote:
> Hi all,
>
> In the bad old days, when I was running my software on a 233MHz
> PowerPC computer with (non-Xenomai) Linux, I could instantly hang the
> machine using the following code:
>
> struct sched_param schedparam; memset(&schedparam, 0,
> sizeof(schedparam)); schedparam.sched_priority = 11; if
> (sched_setscheduler(0, SCHED_RR, &schedparam) != 0)
> perror("sched_setscheduler"); while(1) {/* spin forever, wheee! */}
>
> To recover I would have to power-cycle, since there was no way to
> kill the spinning process.
>
> Now my software runs on a quad-core Xeon under Xenomai, so I would
> expect that it would take four simultaneous instances of the above to
> hang the Linux layers of the machine (the Xenomai real-time bits
> should still run, of course). However, that is not what I am
> seeing.... I can run 4, 8, or even 12 SCHED_RR (or SCHED_FIFO)
> spinning processes like the above, and my regular (SCHED_OTHER) Linux
> process continue to respond (albeit sometimes rather slowly).
>
> Can anyone hazard a guess as to why I'm unable to spin my Linux OS to
> death? I'm curious... :^)
That is because SCHED_FIFO and SCHED_RR tasks can only use
/proc/sys/kernel/sched_rt_runtime_us every
/proc/sys/kernel/sched_rt_period_us.
--
Gilles.
prev parent reply other threads:[~2011-09-09 19:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-09 19:08 [Xenomai-help] Linux scheduling question Jeremy Friesner
2011-09-09 19:40 ` Gilles Chanteperdrix [this message]
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=4E6A6BC0.4080308@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=jaf@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.