public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: torbenh <torbenh@gmx.de>
To: linux-kernel@vger.kernel.org
Subject: Sending some form of notifaction when sched_fifo throttling kicks in...
Date: Thu, 23 Dec 2010 12:39:26 +0100	[thread overview]
Message-ID: <20101223113926.GH14960@siel.b> (raw)


hi...

when the rt_runtime budget is exceeded, the kernel silently stops
scheduling RT tasks. there is no way to distinguish this from 
a task taking very long to complete.

it would be very nice, if the kernel would send some form of notifaction
when it starts throttling things.

recording the timestamp of the last occurence of throttling
in a /proc file would be sufficient, if there were no cgroups.

would it be possible to add a readonly property to the cpu subsystem ?
there is already a printk_once, but thats pretty useless :)


from -rt kernel kernel/sched_rt.c:

----------------------------------------------------------------------------------
static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq)
{
	u64 runtime = sched_rt_runtime(rt_rq);

	if (rt_rq->rt_throttled)
		return rt_rq_throttled(rt_rq);

	if (sched_rt_runtime(rt_rq) >= sched_rt_period(rt_rq))
		return 0;

	balance_runtime(rt_rq);
	runtime = sched_rt_runtime(rt_rq);
	if (runtime == RUNTIME_INF)
		return 0;

	if (rt_rq->rt_time > runtime) {
		rt_rq->rt_throttled = 1;
		printk_once(KERN_WARNING "sched: RT throttling activated\n");
+ // send some form of notification. 
		if (rt_rq_throttled(rt_rq)) {
			sched_rt_rq_dequeue(rt_rq);
			return 1;
		}
	}

	return 0;
}
-----------------------------------------------------------------------------------
-- 
torben Hohn

             reply	other threads:[~2010-12-23 11:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-23 11:39 torbenh [this message]
2010-12-23 13:17 ` Sending some form of notifaction when sched_fifo throttling kicks in Dario Faggioli
2010-12-23 14:04   ` Dhaval Giani
2010-12-23 14:44     ` Dario Faggioli
2010-12-25 19:05       ` Balbir Singh
2010-12-27  6:43   ` Bharata B Rao
2010-12-28 10:30     ` Dario Faggioli

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=20101223113926.GH14960@siel.b \
    --to=torbenh@gmx.de \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox