Thread (27 messages) 27 messages, 9 authors, 2016-03-18

[PATCH v2 5/5] printk/nmi: Increase the size of the temporary buffer

From: pmladek@suse.com (Petr Mladek)
Date: 2015-12-04 15:47:54
Also in: linux-mips, linux-sh, linuxppc-dev, lkml, sparclinux

On Wed 2015-12-02 16:20:41, David Laight wrote:
From: yalin wang
quoted
Sent: 30 November 2015 16:42
quoted
On Nov 27, 2015, at 19:09, Petr Mladek [off-list ref] wrote:

Testing has shown that the backtrace sometimes does not fit
into the 4kB temporary buffer that is used in NMI context.

The warnings are gone when I double the temporary buffer size.
You are wasting a lot of memory for something that is infrequently used.
There ought to be some way of copying partial tracebacks into the
main buffer.
I have already tried to use a separate ring buffer that might be
shared between all CPUs. But it was rejected because it was too
complex. See
http://thread.gmane.org/gmane.linux.kernel/1700059/focus=1700066

If we would want to crate a lockless access to the main ring
buffer, we would end up with something like
kernel/trace/ring_buffer.c. It is even more complicated.
And reading of the messages is pretty slow.

Note that we already have this buffer allocated on x86 and arm.
It is used there for printing backtrace from all CPUs.
This patchset makes it usable for all NMI messages.

But I'll make the size configurable in the next version.

Thanks for review,
Petr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help