Sonny Rao would like John Stultz to review this change.
ANDROID: sched/rt: Add Kconfig option to enable panicking for RT throttling This may be useful for detecting and debugging RT throttling issues. BUG=chrome-os-partner:58667 TEST=build/boot on kevin Change-Id: I5807a897d11997d76421c1fcaa2918aad988c6c9 Signed-off-by: Matt Wagantall <ma...@codeaurora.org> [rameez...@codeaurora.org]: Port to msm-3.18] Signed-off-by: Syed Rameez Mustafa <rameez...@codeaurora.org> [jstultz: forwardported to 4.4] Signed-off-by: John Stultz <john....@linaro.org> (cherry picked from commit 2a4445395f1be46db1200e1329fae06d034675e from android-msm/android-4.4.y) Signed-off-by: Sonny Rao <sonn...@chromium.org> --- M kernel/sched/rt.c M lib/Kconfig.debug 2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 2b9121e..8a16cba 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -924,7 +924,16 @@
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_deferred("%s", buf);
+#endif
}
static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq)
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index c8909ca..02f77ac 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -867,6 +867,15 @@
bool
default n
+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
To view, visit this change. To unsubscribe, visit settings.
Dmitry Torokhov posted comments on this change.
Patch Set 4: Code-Review+2
To view, visit this change. To unsubscribe, visit settings.
Sonny Rao uploaded patch set #3 to this change.
ANDROID: sched/rt: Add Kconfig option to enable panicking for RT throttling This may be useful for detecting and debugging RT throttling issues. BUG=chrome-os-partner:58667 TEST=build/boot on kevin Change-Id: I5807a897d11997d76421c1fcaa2918aad988c6c9 Signed-off-by: Matt Wagantall <ma...@codeaurora.org> [rameez...@codeaurora.org]: Port to msm-3.18] Signed-off-by: Syed Rameez Mustafa <rameez...@codeaurora.org> [jstultz: forwardported to 4.4] Signed-off-by: John Stultz <john....@linaro.org> (cherry picked from commit 2a4445395f1be46db1200e1329fae06d034675e from android-msm/android-4.4.y) Signed-off-by: Sonny Rao <sonn...@chromium.org> --- M kernel/sched/rt.c M lib/Kconfig.debug 2 files changed, 18 insertions(+), 0 deletions(-)
To view, visit this change. To unsubscribe, visit settings.
Sonny Rao posted comments on this change.
Patch Set 5: Verified+1
To view, visit this change. To unsubscribe, visit settings.
Sonny Rao posted comments on this change.
Patch Set 5: Commit-Queue+1
To view, visit this change. To unsubscribe, visit settings.
Sonny Rao posted comments on this change.
Patch Set 6: Commit-Queue+1
To view, visit this change. To unsubscribe, visit settings.
Sonny Rao uploaded patch set #6 to this change.
ANDROID: sched/rt: Add Kconfig option to enable panicking for RT throttling This may be useful for detecting and debugging RT throttling issues. BUG=chrome-os-partner:58667 TEST=build/boot on kevin Change-Id: I5807a897d11997d76421c1fcaa2918aad988c6c9 Signed-off-by: Matt Wagantall <ma...@codeaurora.org> [rameez...@codeaurora.org]: Port to msm-3.18] Signed-off-by: Syed Rameez Mustafa <rameez...@codeaurora.org> [jstultz: forwardported to 4.4] Signed-off-by: John Stultz <john....@linaro.org> (cherry picked from commit 2a4445395f1be46db1200e1329fae06d034675e from android-msm/android-4.4.y) Signed-off-by: Sonny Rao <sonn...@chromium.org> --- M kernel/sched/rt.c M lib/Kconfig.debug 2 files changed, 18 insertions(+), 0 deletions(-)
To view, visit this change. To unsubscribe, visit settings.
Sonny Rao posted comments on this change.
Patch Set 7: Commit-Queue+1
To view, visit this change. To unsubscribe, visit settings.
Sonny Rao posted comments on this change.
Patch Set 7: Verified+1
To view, visit this change. To unsubscribe, visit settings.
Douglas Anderson posted comments on this change.
Patch Set 7: Commit-Queue+1
To view, visit this change. To unsubscribe, visit settings.
Douglas Anderson posted comments on this change.
Patch Set 7: Trybot-Ready+1
To view, visit this change. To unsubscribe, visit settings.
ChromeOS Commit Bot uploaded patch set #8 to this change.
ANDROID: sched/rt: Add Kconfig option to enable panicking for RT throttling This may be useful for detecting and debugging RT throttling issues. BUG=chrome-os-partner:58667 TEST=build/boot on kevin Change-Id: I5807a897d11997d76421c1fcaa2918aad988c6c9 Signed-off-by: Matt Wagantall <ma...@codeaurora.org> [rameez...@codeaurora.org]: Port to msm-3.18] Signed-off-by: Syed Rameez Mustafa <rameez...@codeaurora.org> [jstultz: forwardported to 4.4] Signed-off-by: John Stultz <john....@linaro.org> (cherry picked from commit 2a4445395f1be46db1200e1329fae06d034675e from android-msm/android-4.4.y) Signed-off-by: Sonny Rao <sonn...@chromium.org
> Reviewed-on: https://chromium-review.googlesource.com/420083 Commit-Ready: Douglas Anderson <dian...@chromium.org> Reviewed-by: Dmitry Torokhov <dt...@chromium.org> --- M kernel/sched/rt.c M lib/Kconfig.debug 2 files changed, 18 insertions(+), 0 deletions(-)
To view, visit this change. To unsubscribe, visit settings.
ChromeOS Commit Bot merged this change.
ANDROID: sched/rt: Add Kconfig option to enable panicking for RT throttling This may be useful for detecting and debugging RT throttling issues. BUG=chrome-os-partner:58667 TEST=build/boot on kevin Change-Id: I5807a897d11997d76421c1fcaa2918aad988c6c9 Signed-off-by: Matt Wagantall <ma...@codeaurora.org> [rameez...@codeaurora.org]: Port to msm-3.18] Signed-off-by: Syed Rameez Mustafa <rameez...@codeaurora.org> [jstultz: forwardported to 4.4] Signed-off-by: John Stultz <john....@linaro.org> (cherry picked from commit 2a4445395f1be46db1200e1329fae06d034675e from android-msm/android-4.4.y) Signed-off-by: Sonny Rao <sonn...@chromium.org
> Reviewed-on: https://chromium-review.googlesource.com/420083 Commit-Ready: Douglas Anderson <dian...@chromium.org> Reviewed-by: Dmitry Torokhov <dt...@chromium.org> --- M kernel/sched/rt.c M lib/Kconfig.debug 2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 2b9121e..8a16cba 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -924,7 +924,16 @@
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_deferred("%s", buf);
+#endif
}
static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq)
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 168e396..32facd2 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -888,6 +888,15 @@
bool
default n
+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
To view, visit this change. To unsubscribe, visit settings.