[PATCH 1/1] sched/rt: add rt throttled/unthrottled log

From: Jing-Ting Wu
Date: Tue Sep 08 2020 - 05:06:05 EST


Always print logs when rt throttle/unthrottle,
it is much easier to locate the throttled period.

Signed-off-by: Jing-Ting Wu <jing-ting.wu@xxxxxxxxxxxx>
---
kernel/sched/rt.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index f215eea..598046c 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -902,6 +902,9 @@ static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun)
rt_rq->rt_throttled = 0;
enqueue = 1;

+ printk_deferred("sched: RT throttling inactivated cpu=%d\n",
+ i);
+
/*
* When we're idle and a woken (rt) task is
* throttled check_preempt_curr() will set
@@ -970,7 +973,7 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq)
*/
if (likely(rt_b->rt_runtime)) {
rt_rq->rt_throttled = 1;
- printk_deferred_once("sched: RT throttling activated\n");
+ printk_deferred("sched: RT throttling activated\n");
} else {
/*
* In case we did anyway, make it go away,
--
1.7.9.5