From: Mike Galbraith <bitbucket@online.de>
To: Peter Boonstoppel <pboonstoppel@nvidia.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Paul Walmsley <pwalmsley@nvidia.com>
Subject: Re: [PATCH RFC] sched/rt: preserve global runtime/period ratio in do_balance_runtime()
Date: Wed, 22 May 2013 07:59:45 +0200 [thread overview]
Message-ID: <1369202385.5782.33.camel@marge.simpson.net> (raw)
In-Reply-To: <5FBF8E85CA34454794F0F7ECBA79798F37ADA53CA7@HQMAIL04.nvidia.com>
On Tue, 2013-05-21 at 14:30 -0700, Peter Boonstoppel wrote:
> RT throttling aims to prevent starvation of non-SCHED_FIFO threads
> when a rogue RT thread is hogging the CPU. It does so by piggybacking
> on the rt_bandwidth system and allocating at most rt_runtime per
> rt_period to SCHED_FIFO tasks (e.g. 950ms out of every second,
> allowing 'regular' tasks to run for at least 50ms every second).
>
> However, when multiple cores are available, rt_bandwidth allows cores
> to borrow rt_runtime from one another. This means that a core with a
> rogue RT thread, consuming 100% CPU cycles, can borrow enough runtime
> from other cores to allow the RT thread to run continuously, with no
> runtime for regular tasks on this core.
>
> Although regular tasks can get scheduled on other available cores
> (which are guaranteed to have some non-RT runtime avaible, since they
> just lent some RT time to us), tasks that are specifically affined to
> a particular core may not be able to make progress (e.g. workqueues,
> timer functions). This can break e.g. watchdog-like functionality that
> is supposed to kill the rogue RT thread.
>
> This patch changes do_balance_runtime() in such a way that no core can
> aquire (borrow) more runtime than the globally set rt_runtime /
> rt_period ratio. This guarantees there will always be some non-RT
> runtime available on every individual core.
Seems to me it's be better to just invert RT_RUNTIME_SHARE default
setting, since the real world throttle mission tends to be saving the
user from his own brilliance a lot more often than any group scheduling
or debugging.
I see this fairly frequently: "My application is the most important
thing in the universe, so of course I run it SCHED_FIFO priority 99.
Why does all kinds of bad juju happen, frequently ending with box
ignoring all gefingerpoken und mittenmgrabben, when I do something as
innocuous as turning my pet cpuhog from hell loose in godmode?"
-Mike
next prev parent reply other threads:[~2013-05-22 6:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-21 21:30 Peter Boonstoppel
2013-05-22 5:59 ` Mike Galbraith [this message]
2013-05-22 7:58 ` Michael Wang
2013-05-22 8:16 ` Peter Zijlstra
2013-05-22 8:46 ` Mike Galbraith
2013-05-23 22:24 ` Peter Boonstoppel
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=1369202385.5782.33.camel@marge.simpson.net \
--to=bitbucket@online.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pboonstoppel@nvidia.com \
--cc=peterz@infradead.org \
--cc=pwalmsley@nvidia.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®