From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754725AbdDFWIe (ORCPT ); Thu, 6 Apr 2017 18:08:34 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:45216 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751557AbdDFWIZ (ORCPT ); Thu, 6 Apr 2017 18:08:25 -0400 Date: Thu, 6 Apr 2017 15:08:21 -0700 From: "Paul E. McKenney" To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton Subject: Re: [PATCH 3/4] tracing: Add stack_tracer_disable/enable() functions Reply-To: paulmck@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170406172348.6df0201b@gandalf.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17040622-0052-0000-0000-000001CB5A68 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006889; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000208; SDB=6.00844017; UDB=6.00415970; IPR=6.00622272; BA=6.00005274; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014941; XFM=3.00000013; UTC=2017-04-06 22:08:21 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17040622-0053-0000-0000-00004FBF5138 Message-Id: <20170406220821.GN1600@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-06_14:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704060181 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanx, Paul