From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932586AbdDFX6B (ORCPT ); Thu, 6 Apr 2017 19:58:01 -0400 Received: from smtprelay0072.hostedemail.com ([216.40.44.72]:50478 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753601AbdDFX5x (ORCPT ); Thu, 6 Apr 2017 19:57:53 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1969:2195:2199:2393:2553:2559:2562:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3874:5007:6261:7875:8660:8957:10004:10400:10848:10967:11026:11232:11473:11658:11914:12043:12114:12438:12740:12760:12895:13069:13141:13148:13230:13311:13357:13439:14096:14097:14181:14659:14721:21080:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: fact18_a2b6ae012e30 X-Filterd-Recvd-Size: 2369 Date: Thu, 6 Apr 2017 19:57: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: <20170406195748.68f1d0fb@grimm.local.home> In-Reply-To: <20170406220821.GN1600@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> <20170406172348.6df0201b@gandalf.local.home> <20170406220821.GN1600@linux.vnet.ibm.com> X-Mailer: Claws Mail 3.14.1 (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 15:08:21 -0700 "Paul E. McKenney" wrote: > On Thu, Apr 06, 2017 at 05:23:48PM -0400, Steven Rostedt wrote: > > 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()); > > This in the include/linux/ftrace.h file so that it can be inlined? > That makes sense to me. > Hah, I already had that part (inlining) written. It's a separate patch though. I'll post another series tomorrow. -- Steve