printk: Add printk_deferred_once
Two of the three prink_deferred uses are really printk_once style uses, so add a printk_deferred_once macro to simplify those call sites. Signed-off-by: John Stultz <john.stultz@linaro.org> Reviewed-by: Steven Rostedt <rostedt@goodmis.org> Reviewed-by: Jan Kara <jack@suse.cz> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Jiri Bohac <jbohac@suse.cz> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
aac74dc495
commit
c224815dac
@@ -890,14 +890,8 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq)
|
||||
* but accrue some time due to boosting.
|
||||
*/
|
||||
if (likely(rt_b->rt_runtime)) {
|
||||
static bool once = false;
|
||||
|
||||
rt_rq->rt_throttled = 1;
|
||||
|
||||
if (!once) {
|
||||
once = true;
|
||||
printk_deferred("sched: RT throttling activated\n");
|
||||
}
|
||||
printk_deferred_once("sched: RT throttling activated\n");
|
||||
} else {
|
||||
/*
|
||||
* In case we did anyway, make it go away,
|
||||
|
Reference in New Issue
Block a user