From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751150AbdE2PLF (ORCPT ); Mon, 29 May 2017 11:11:05 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:56002 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750985AbdE2PLE (ORCPT ); Mon, 29 May 2017 11:11:04 -0400 Date: Mon, 29 May 2017 08:11:00 -0700 From: "Paul E. McKenney" To: Leonard Crestez Cc: Shawn Guo , Fabio Estevam , Dong Aisheng , linux-arm-kernel@lists.infradead.org, Matt Fleming , Octavian Purdila , Stephen Rothwell , linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: imx_v6_v7_defconfig: Explicitly restore CONFIG_DEBUG_FS Reply-To: paulmck@linux.vnet.ibm.com References: <49b2579b9ad2e5ce0a7c4b163dffb5a885ac7dae.1495797565.git.leonard.crestez@nxp.com> <20170526154236.GY3956@linux.vnet.ibm.com> <1496059116.31994.6.camel@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1496059116.31994.6.camel@nxp.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17052915-0036-0000-0000-000002165CD9 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007139; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000212; SDB=6.00867284; UDB=6.00430889; IPR=6.00647163; BA=6.00005383; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00015630; XFM=3.00000015; UTC=2017-05-29 15:11:00 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17052915-0037-0000-0000-000040843311 Message-Id: <20170529151100.GJ3956@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-29_11:,, 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-1703280000 definitions=main-1705290284 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 29, 2017 at 02:58:36PM +0300, Leonard Crestez wrote: > On Fri, 2017-05-26 at 08:42 -0700, Paul E. McKenney wrote: > > On Fri, May 26, 2017 at 02:26:06PM +0300, Leonard Crestez wrote: > > > > > > This option was removed by "make savedefconfig" in > > > commit c5054a98bce4 ("ARM: imx_v6_v7_defconfig: Select SMSC_PHY") > > > > > > This happened because CONFIG_DEBUG_FS was implicitly selected by > > > CONFIG_TREE_RCU_TRACE which defaulted to true because CONFIG_RCU_TRACE > > > was enabled by default by commit 961518259b3b ("rcu: Enable RCU > > > tracepoints by default to aid in debugging") > > > > > > Recently however CONFIG_RCU_TRACE was completely removed by > > > commit 6e74c237c410 ("rcu: Remove debugfs tracing") > > > CONFIG_RCU_TRACE is still very much alive in its new home at > > kernel/rcu/Kconfig.debug: > > Sorry, what was removed is the dependency on DEBUG_FS. In particular > this snippet: > > diff --git a/init/Kconfig b/init/Kconfig > index 2aa14ff..3025383 100644 > -- > - a/init/Kconfig > +++ b/init/Kconfig > @@ -659,14 +659,6 @@ config > RCU_FAST_NO_HZ >   >           Say N if you are unsure. >   > -config > TREE_RCU_TRACE > -       def_bool RCU_TRACE && ( TREE_RCU || PREEMPT_RCU ) > -       select DEBUG_FS Ah, you are right. RCU no longer needs DEBUG_FS, so it no longer selects it. > -       help > -         This option provides > tracing for the TREE_RCU and > -         PREEMPT_RCU implementations, > permitting Makefile to > -         trivially select > kernel/rcutree_trace.c. > - >  config RCU_BOOST >         bool "Enable RCU > priority boosting" >         depends on RT_MUTEXES && PREEMPT_RCU && > RCU_EXPERT > > > config RCU_TRACE > > bool "Enable tracing for RCU" > > depends on DEBUG_KERNEL > > default y if TREE_RCU > > select TRACE_CLOCK > > help > >   This option enables additional tracepoints for ftrace-style > >   event tracing. > > > >   Say Y here if you want to enable RCU tracing > >   Say N if you are unsure. > > > > That said, I need to make it default to "y" if PREEMPT_RCU as well as > > the current TREE_RCU.  Would that help? > > I don't think you can help unless you want to make RCU_TRACE depend on > DEBUG_FS for no reason. The proper fix is to have DEBUG_FS inside the > imx_v6_v7_defconfig. > > My problem is just an unfortunate accident with default dependencies > and overzealous savedefconfig. Right you are! > As far as I understand after recent changes RCU_TRACE is now only > useful with tracepoints. Shouldn't it depend on TRACEPOINTS in some > way? It's still possible to compile with RCU_TRACE on and TRACEPOINTS > off, is this intentional? It seems that when this happens you're just > relying on tracepoint macros to expand to nothing. > > Fr example maybe RCU_TRACE should be "default y if (TREE_RCU && > TRACEPOINTS); depends on TRACEPOINTS"? > > In theory you could also "select TRACEPOINTS" but then you would end up > enabling TRACEPOINTS by default in all configurations that use TREE_RCU > but don't explicitly disable RCU_TRACE. > > I'd say that if $SUBSYSTEM_DEBUG depends on $MAJOR_DEBUG_FEATURE it > should try to avoid selecting $MAJOR_DEBUG_FEATURE by default if it's > not otherwise enabled. As far as I can tell this is how RCU ended up > indirectly pulling in DEBUG_FS and later unexpectedly removed it. > > Or I could be completely wrong, kconfig can be very confusing. Interesting questions! I will give them some thought. Perhaps TRACEPOINTS is accidentally being enabled for me just as DEBUG_FS was being accidentally enabled for you. ;-) Thanx, Paul From mboxrd@z Thu Jan 1 00:00:00 1970 From: paulmck@linux.vnet.ibm.com (Paul E. McKenney) Date: Mon, 29 May 2017 08:11:00 -0700 Subject: [PATCH] ARM: imx_v6_v7_defconfig: Explicitly restore CONFIG_DEBUG_FS In-Reply-To: <1496059116.31994.6.camel@nxp.com> References: <49b2579b9ad2e5ce0a7c4b163dffb5a885ac7dae.1495797565.git.leonard.crestez@nxp.com> <20170526154236.GY3956@linux.vnet.ibm.com> <1496059116.31994.6.camel@nxp.com> Message-ID: <20170529151100.GJ3956@linux.vnet.ibm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, May 29, 2017 at 02:58:36PM +0300, Leonard Crestez wrote: > On Fri, 2017-05-26 at 08:42 -0700, Paul E. McKenney wrote: > > On Fri, May 26, 2017 at 02:26:06PM +0300, Leonard Crestez wrote: > > > > > > This option was removed by "make savedefconfig" in > > > commit c5054a98bce4 ("ARM: imx_v6_v7_defconfig: Select SMSC_PHY") > > > > > > This happened because CONFIG_DEBUG_FS was implicitly selected by > > > CONFIG_TREE_RCU_TRACE which defaulted to true because CONFIG_RCU_TRACE > > > was enabled by default by commit 961518259b3b ("rcu: Enable RCU > > > tracepoints by default to aid in debugging") > > > > > > Recently however CONFIG_RCU_TRACE was completely removed by > > > commit 6e74c237c410 ("rcu: Remove debugfs tracing") > > > CONFIG_RCU_TRACE is still very much alive in its new home at > > kernel/rcu/Kconfig.debug: > > Sorry, what was removed is the dependency on DEBUG_FS. In particular > this snippet: > > diff --git a/init/Kconfig b/init/Kconfig > index 2aa14ff..3025383 100644 > -- > - a/init/Kconfig > +++ b/init/Kconfig > @@ -659,14 +659,6 @@ config > RCU_FAST_NO_HZ > ? > ??????????Say N if you are unsure. > ? > -config > TREE_RCU_TRACE > -???????def_bool RCU_TRACE && ( TREE_RCU || PREEMPT_RCU ) > -???????select DEBUG_FS Ah, you are right. RCU no longer needs DEBUG_FS, so it no longer selects it. > -???????help > -?????????This option provides > tracing for the TREE_RCU and > -?????????PREEMPT_RCU implementations, > permitting Makefile to > -?????????trivially select > kernel/rcutree_trace.c. > - > ?config RCU_BOOST > ????????bool "Enable RCU > priority boosting" > ????????depends on RT_MUTEXES && PREEMPT_RCU && > RCU_EXPERT > > > config RCU_TRACE > > bool "Enable tracing for RCU" > > depends on DEBUG_KERNEL > > default y if TREE_RCU > > select TRACE_CLOCK > > help > > ??This option enables additional tracepoints for ftrace-style > > ??event tracing. > > > > ??Say Y here if you want to enable RCU tracing > > ??Say N if you are unsure. > > > > That said, I need to make it default to "y" if PREEMPT_RCU as well as > > the current TREE_RCU.??Would that help? > > I don't think you can help unless you want to make RCU_TRACE depend on > DEBUG_FS for no reason. The proper fix is to have DEBUG_FS inside the > imx_v6_v7_defconfig. > > My problem is just an unfortunate accident with default dependencies > and overzealous savedefconfig. Right you are! > As far as I understand after recent changes RCU_TRACE is now only > useful with tracepoints. Shouldn't it depend on TRACEPOINTS in some > way? It's still possible to compile with RCU_TRACE on and TRACEPOINTS > off, is this intentional? It seems that when this happens you're just > relying on tracepoint macros to expand to nothing. > > Fr example maybe RCU_TRACE should be "default y if (TREE_RCU && > TRACEPOINTS); depends on TRACEPOINTS"? > > In theory you could also "select TRACEPOINTS" but then you would end up > enabling TRACEPOINTS by default in all configurations that use TREE_RCU > but don't explicitly disable RCU_TRACE. > > I'd say that if $SUBSYSTEM_DEBUG depends on $MAJOR_DEBUG_FEATURE it > should try to avoid selecting $MAJOR_DEBUG_FEATURE by default if it's > not otherwise enabled. As far as I can tell this is how RCU ended up > indirectly pulling in DEBUG_FS and later unexpectedly removed it. > > Or I could be completely wrong, kconfig can be very confusing. Interesting questions! I will give them some thought. Perhaps TRACEPOINTS is accidentally being enabled for me just as DEBUG_FS was being accidentally enabled for you. ;-) Thanx, Paul