public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Sending some form of notifaction when sched_fifo throttling kicks in...
@ 2010-12-23 11:39 torbenh
  2010-12-23 13:17 ` Dario Faggioli
  0 siblings, 1 reply; 7+ messages in thread
From: torbenh @ 2010-12-23 11:39 UTC (permalink / raw)
  To: linux-kernel


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-12-28 10:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-23 11:39 Sending some form of notifaction when sched_fifo throttling kicks in torbenh
2010-12-23 13:17 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox