From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755463AbdDFVYC (ORCPT ); Thu, 6 Apr 2017 17:24:02 -0400 Received: from mail.kernel.org ([198.145.29.136]:46952 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752173AbdDFVXx (ORCPT ); Thu, 6 Apr 2017 17:23:53 -0400 Date: Thu, 6 Apr 2017 17:23:48 -0400 From: Steven Rostedt To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton Subject: Re: [PATCH 3/4] tracing: Add stack_tracer_disable/enable() functions Message-ID: <20170406172348.6df0201b@gandalf.local.home> In-Reply-To: <20170406202117.GK1600@linux.vnet.ibm.com> References: <20170406164237.874767449@goodmis.org> <20170406164432.361457723@goodmis.org> <20170406181222.GH1600@linux.vnet.ibm.com> <20170406144803.63ee287c@gandalf.local.home> <20170406202117.GK1600@linux.vnet.ibm.com> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 6 Apr 2017 13:21:17 -0700 "Paul E. McKenney" wrote: > > My worry is that we add another caller that doesn't disable interrupts > > or preemption. > > > > I could add a __stack_trace_disable() that skips the disabling of > > preemption, as the "__" usually denotes the call is "special". > > Given that interrupts are disabled at that point, and given also that > NMI skips stack tracing if growth is required, could we just leave > out the stack_tracer_disable() and stack_tracer_enable()? There may be other use cases. Hmm, maybe I'll just have it do a check to make sure preemption is disabled. Something like: if (IS_ENABLED(CONFIG_DEBUG_PREEMPT)) WARN_ON_ONCE(!preempt_count()); -- Steve