Skip to content

Commit

Permalink
Merge "sched/rt: Add Kconfig option to enable panicking for RT thrott…
Browse files Browse the repository at this point in the history
…ling"
  • Loading branch information
Linux Build Service Account authored and Gerrit - the friendly Code Review server committed Jul 25, 2014
2 parents e88deaa + bc05334 commit 602ef1f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions kernel/sched/rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,16 @@ static void dump_throttled_rt_tasks(struct rt_rq *rt_rq)
idx = find_next_bit(array->bitmap, MAX_RT_PRIO, idx + 1);
}
out:
#ifdef CONFIG_PANIC_ON_RT_THROTTLING
/*
* Use pr_err() in the BUG() case since printk_sched() will
* not get flushed and deadlock is not a concern.
*/
pr_err("%s", buf);
BUG();
#else
printk_sched("%s", buf);
#endif
}

static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq)
Expand Down
9 changes: 9 additions & 0 deletions lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,15 @@ config SYSRQ_SCHED_DEBUG
"show-blocked-tasks(W)" sysrq-triggers will print additional
scheduling statistics.

config PANIC_ON_RT_THROTTLING
bool "Panic on RT throttling"
help
Say Y here to enable the kernel to panic when a realtime
runqueue is throttled. This may be useful for detecting
and debugging RT throttling issues.

Say N if unsure.

config SCHEDSTATS
bool "Collect scheduler statistics"
depends on DEBUG_KERNEL && PROC_FS
Expand Down

0 comments on commit 602ef1f

Please sign in to comment.