Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967491AbcCRAmd (ORCPT ); Thu, 17 Mar 2016 20:42:33 -0400 Received: from e33.co.us.ibm.com ([32.97.110.151]:45908 "EHLO e33.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965586AbcCRAmY (ORCPT ); Thu, 17 Mar 2016 20:42:24 -0400 X-IBM-Helo: d03dlp03.boulder.ibm.com X-IBM-MailFrom: paulmck@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Thu, 17 Mar 2016 17:33:22 -0700 From: "Paul E. McKenney" To: Chris Metcalf Cc: Peter Zijlstra , Russell King , Thomas Gleixner , Aaron Tomlin , Ingo Molnar , Andrew Morton , Daniel Thompson , x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/4] nmi_backtrace: add more trigger_*_cpu_backtrace() methods Message-ID: <20160318003322.GC4287@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <1458147733-29338-1-git-send-email-cmetcalf@mellanox.com> <1458147733-29338-2-git-send-email-cmetcalf@mellanox.com> <20160317193600.GY6344@twins.programming.kicks-ass.net> <20160317225557.GA4287@linux.vnet.ibm.com> <56EB4937.1010404@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56EB4937.1010404@mellanox.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16031800-0009-0000-0000-0000157710FD Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1386 Lines: 29 On Thu, Mar 17, 2016 at 08:17:59PM -0400, Chris Metcalf wrote: > On 3/17/2016 6:55 PM, Paul E. McKenney wrote: > >The RCU stall-warn stack traces can be ugly, agreed. > > > >That said, RCU used to use NMI-based stack traces, but switched to the > >current scheme due to the NMIs having the unfortunate habit of locking > >things up, which IIRC often meant no stack traces at all. If I recall > >correctly, one of the problems was self-deadlock in printk(). > > Steven Rostedt enabled the per_cpu printk func support in June 2014, and > the nmi_backtrace code uses it to just capture printk output to percpu > buffers, so I think it's going to be a lot more robust than earlier attempts. That would be a very good thing, give or take the "I think" qualifier. And assuming that the target CPU is healthy enough to find its way back to some place that can dump the per-CPU printk buffer. I might well be overly paranoid, but I have to suspect that the probability of that buffer getting dumped is reduced greatly on a CPU that isn't healthy enough to respond to RCU, though. But it seems like enabling the experiment might be useful. "Try enabling the NMI version. If that doesn't get you your RCU CPU stall warning stack trace, try the remote-print variant." Or I suppose we could just do both in succession, just in case their console was a serial port. ;-) Thanx, Paul