From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 04 Dec 2015 16:47:52 +0100 (CET) Received: from mx2.suse.de ([195.135.220.15]:56851 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S27007599AbbLDPruj4rX7 (ORCPT ); Fri, 4 Dec 2015 16:47:50 +0100 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 040DBAB12; Fri, 4 Dec 2015 15:47:50 +0000 (UTC) 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) Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 50341 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: pmladek@suse.com Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx2.suse.de ([195.135.220.15]:56851 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S27007599AbbLDPruj4rX7 (ORCPT ); Fri, 4 Dec 2015 16:47:50 +0100 Date: Fri, 4 Dec 2015 16:47:49 +0100 From: Petr Mladek 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> Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: 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" Message-ID: <20151204154749.OP8qV0B3apiFE31eTMHUVbyfuYTh4hXpoIAfaMUUAFI@z> 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