Re: [PATCH] mm: don't warn about allocations which stall for too long

From: Steven Rostedt
Date: Wed Nov 01 2017 - 11:33:44 EST


On Wed, 1 Nov 2017 09:30:05 +0100
Vlastimil Babka <vbabka@xxxxxxx> wrote:

>
> But still, it seems to me that the scheme only works as long as there
> are printk()'s coming with some reasonable frequency. There's still a
> corner case when a storm of printk()'s can come that will fill the ring
> buffers, and while during the storm the printing will be distributed
> between CPUs nicely, the last unfortunate CPU after the storm subsides
> will be left with a large accumulated buffer to print, and there will be
> no waiters to take over if there are no more printk()'s coming. What
> then, should it detect such situation and defer the flushing?

No!

If such a case happened, that means the system is doing something
really stupid.

Btw, each printk that takes over, does one message, so the last one to
take over, shouldn't have a full buffer anyway.

But still, if you have such a hypothetical situation, the system should
just crash. The printk is still bounded by the length of the buffer.
Although it is slow, it will finish. Which is not the case with the
current situation. And the current situation (as which this patch
demonstrates) does happen today and is not hypothetical.

-- Steve