Re: [PATCH] printk: Ratelimit messages printed by console drivers

From: Steven Rostedt
Date: Fri Apr 20 2018 - 08:04:36 EST


On Fri, 20 Apr 2018 11:12:24 +0200
Petr Mladek <pmladek@xxxxxxxx> wrote:

> Yes, my number was arbitrary. The important thing is that it was long
> enough. Or do you know about an console that will not be able to write
> 100 lines within one hour?

The problem is the way rate limit works. If you print 100 lines (or
1000) in 5 seconds, then you just stopped printing from that context
for 59 minutes and 55 seconds. That's a long time to block printing.

What happens if you had a couple of NMIs go off that takes up that
time, and then you hit a bug 10 minutes later from that context. You
just lost it.

This is a magnitude larger than any other user of rate limit in the
kernel. The most common time is 5 seconds. The longest I can find is 1
minute. You are saying you want to block printing from this context for
60 minutes!

That is HUGE! I don't understand your rational for such a huge number.
What data do you have to back that up with?

-- Steve