diff options
-rw-r--r-- | include/linux/printk.h | 11 | ||||
-rw-r--r-- | kernel/sched/deadline.c | 7 | ||||
-rw-r--r-- | kernel/sched/rt.c | 8 |
3 files changed, 13 insertions, 13 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h index 7847301e2837..f086d6c99dbc 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
@@ -266,9 +266,20 @@ extern asmlinkage void dump_stack(void) __cold; | |||
266 | printk(fmt, ##__VA_ARGS__); \ | 266 | printk(fmt, ##__VA_ARGS__); \ |
267 | } \ | 267 | } \ |
268 | }) | 268 | }) |
269 | #define printk_deferred_once(fmt, ...) \ | ||
270 | ({ \ | ||
271 | static bool __print_once __read_mostly; \ | ||
272 | \ | ||
273 | if (!__print_once) { \ | ||
274 | __print_once = true; \ | ||
275 | printk_deferred(fmt, ##__VA_ARGS__); \ | ||
276 | } \ | ||
277 | }) | ||
269 | #else | 278 | #else |
270 | #define printk_once(fmt, ...) \ | 279 | #define printk_once(fmt, ...) \ |
271 | no_printk(fmt, ##__VA_ARGS__) | 280 | no_printk(fmt, ##__VA_ARGS__) |
281 | #define printk_deferred_once(fmt, ...) \ | ||
282 | no_printk(fmt, ##__VA_ARGS__) | ||
272 | #endif | 283 | #endif |
273 | 284 | ||
274 | #define pr_emerg_once(fmt, ...) \ | 285 | #define pr_emerg_once(fmt, ...) \ |
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index d17e1c48a79d..e1574fca03b5 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c | |||
@@ -348,12 +348,7 @@ static void replenish_dl_entity(struct sched_dl_entity *dl_se, | |||
348 | * entity. | 348 | * entity. |
349 | */ | 349 | */ |
350 | if (dl_time_before(dl_se->deadline, rq_clock(rq))) { | 350 | if (dl_time_before(dl_se->deadline, rq_clock(rq))) { |
351 | static bool lag_once = false; | 351 | printk_deferred_once("sched: DL replenish lagged to much\n"); |
352 | |||
353 | if (!lag_once) { | ||
354 | lag_once = true; | ||
355 | printk_deferred("sched: DL replenish lagged to much\n"); | ||
356 | } | ||
357 | dl_se->deadline = rq_clock(rq) + pi_se->dl_deadline; | 352 | dl_se->deadline = rq_clock(rq) + pi_se->dl_deadline; |
358 | dl_se->runtime = pi_se->dl_runtime; | 353 | dl_se->runtime = pi_se->dl_runtime; |
359 | } | 354 | } |
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 5d7667b37c21..b3512f1afce9 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c | |||
@@ -890,14 +890,8 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq) | |||
890 | * but accrue some time due to boosting. | 890 | * but accrue some time due to boosting. |
891 | */ | 891 | */ |
892 | if (likely(rt_b->rt_runtime)) { | 892 | if (likely(rt_b->rt_runtime)) { |
893 | static bool once = false; | ||
894 | |||
895 | rt_rq->rt_throttled = 1; | 893 | rt_rq->rt_throttled = 1; |
896 | 894 | printk_deferred_once("sched: RT throttling activated\n"); | |
897 | if (!once) { | ||
898 | once = true; | ||
899 | printk_deferred("sched: RT throttling activated\n"); | ||
900 | } | ||
901 | } else { | 895 | } else { |
902 | /* | 896 | /* |
903 | * In case we did anyway, make it go away, | 897 | * In case we did anyway, make it go away, |