Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753788AbbLDPry (ORCPT ); Fri, 4 Dec 2015 10:47:54 -0500 Received: from mx2.suse.de ([195.135.220.15]:56884 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753309AbbLDPrw (ORCPT ); Fri, 4 Dec 2015 10:47:52 -0500 Date: Fri, 4 Dec 2015 16:47:49 +0100 From: Petr Mladek To: David Laight Cc: "'yalin wang'" , "linux-mips@linux-mips.org" , Daniel Thompson , Jiri Kosina , "linux-cris-kernel@axis.com" , "linux-s390@vger.kernel.org" , Peter Zijlstra , "x86@kernel.org" , linux-kernel , Steven Rostedt , "adi-buildroot-devel@lists.sourceforge.net" , Ingo Molnar , "linux-sh@vger.kernel.org" , "sparclinux@vger.kernel.org" , Russell King , Andrew Morton , "linuxppc-dev@lists.ozlabs.org" , Thomas Gleixner , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH v2 5/5] printk/nmi: Increase the size of the temporary buffer Message-ID: <20151204154749.GC20935@pathway.suse.cz> References: <1448622572-16900-1-git-send-email-pmladek@suse.com> <1448622572-16900-6-git-send-email-pmladek@suse.com> <81211733-2484-40A9-9D4A-644AA27FBC73@gmail.com> <063D6719AE5E284EB5DD2968C1650D6D1CBE1231@AcuExch.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1CBE1231@AcuExch.aculab.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1459 Lines: 37 On Wed 2015-12-02 16:20:41, David Laight wrote: > From: yalin wang > > Sent: 30 November 2015 16:42 > > > On Nov 27, 2015, at 19:09, Petr Mladek 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/