From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756486AbaFYL5w (ORCPT ); Wed, 25 Jun 2014 07:57:52 -0400 Received: from cantor2.suse.de ([195.135.220.15]:37603 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753952AbaFYL5t (ORCPT ); Wed, 25 Jun 2014 07:57:49 -0400 Date: Wed, 25 Jun 2014 13:57:45 +0200 From: Petr =?iso-8859-1?Q?Ml=E1dek?= To: Konstantin Khlebnikov Cc: Jiri Kosina , Steven Rostedt , Linux Kernel Mailing List , Linus Torvalds , Ingo Molnar , Andrew Morton , Michal Hocko , Jan Kara , Frederic Weisbecker , Dave Anderson Subject: Re: [RFC][PATCH 0/3] x86/nmi: Print all cpu stacks from NMI safely Message-ID: <20140625115745.GK8769@pathway.suse.cz> References: <20140619185810.4137e14b@gandalf.local.home> <20140619191923.1365850a@gandalf.local.home> <20140619193635.1949b469@gandalf.local.home> <20140620143525.GB8769@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Wed 2014-06-25 15:04:41, Konstantin Khlebnikov wrote: > On Wed, Jun 25, 2014 at 2:01 PM, Jiri Kosina wrote: > > On Tue, 24 Jun 2014, Konstantin Khlebnikov wrote: > > I like that context-depend printk routing from this patchset. > I'm just not quite happy with this straight forward implementation. > Rerouting flow into different buffers might serve different purposes, > it must make code simpler instead of adding yet another knot. > For example printk continuation might use it too. Note that we could not share the buffer between normal and NMI context easily. We would end with the same locking problems as we have now. In fact, any sharing is complicated when NMI is involved, especially when we need to access the data from both NMI and normal context. And we need to copy them into the main ring buffer in a normal context. This patchset works only because arch_trigger_all_cpu_backtrace() is called from normal context. Also all other calls are ignored until the previous call is finished, see "backtrace_flag". Best Regards, Petr