Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753172AbdGLTAP (ORCPT ); Wed, 12 Jul 2017 15:00:15 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:35440 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752363AbdGLTAO (ORCPT ); Wed, 12 Jul 2017 15:00:14 -0400 Date: Wed, 12 Jul 2017 12:00:06 -0700 From: "Paul E. McKenney" To: Peter Zijlstra Cc: Frederic Weisbecker , Christoph Lameter , "Li, Aubrey" , Andi Kleen , Aubrey Li , tglx@linutronix.de, len.brown@intel.com, rjw@rjwysocki.net, tim.c.chen@linux.intel.com, arjan@linux.intel.com, yang.zhang.wz@gmail.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v1 00/11] Create fast idle path for short idle periods Reply-To: paulmck@linux.vnet.ibm.com References: <20170710172705.GA3441@tassilo.jf.intel.com> <20170711094157.5xcwkloxnjehieqv@hirez.programming.kicks-ass.net> <20170711160926.GA18805@lerouge> <20170711163422.etydkhhtgfthpfi5@hirez.programming.kicks-ass.net> <20170711180931.GP2393@linux.vnet.ibm.com> <20170712115451.xxz3jkau7ape76n5@hirez.programming.kicks-ass.net> <20170712155651.GX2393@linux.vnet.ibm.com> <20170712174642.sewe3vlryq7bm7kc@hirez.programming.kicks-ass.net> <20170712185306.GB2393@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170712185306.GB2393@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17071219-0052-0000-0000-0000023E71ED X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007356; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000214; SDB=6.00886619; UDB=6.00442590; IPR=6.00666769; BA=6.00005468; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016201; XFM=3.00000015; UTC=2017-07-12 19:00:11 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071219-0053-0000-0000-0000514E1841 Message-Id: <20170712190006.GA28034@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-12_06:,, 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-1706020000 definitions=main-1707120306 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2333 Lines: 62 On Wed, Jul 12, 2017 at 11:53:06AM -0700, Paul E. McKenney wrote: > On Wed, Jul 12, 2017 at 07:46:42PM +0200, Peter Zijlstra wrote: > > On Wed, Jul 12, 2017 at 08:56:51AM -0700, Paul E. McKenney wrote: > > > Very good, I have queued the patch below. I left out the removal of > > > the export as I need to work out why the export was there. If it turns > > > out not to be needed, I will remove the related ones as well. > > > > 'git grep rcu_idle_enter' shows no callers other than > > kernel/sched/idle.c. Which seems a clear indication its not needed. > > > > You also have to ask yourself, do I want joe module author to ever call > > this. To which I suspect the answer is: hell no ;-) > > The other question is "why did I do this in the first place". > > The only case where there will turn out to have been a still-valid reason > is if I remove it without checking first. ;-) And I have now checked. Please see below. Thanx, Paul ------------------------------------------------------------------------ commit 31b2fd02abe5f036d7e83461bd19bbca3636d62e Author: Paul E. McKenney Date: Wed Jul 12 11:55:21 2017 -0700 rcu: Remove exports from rcu_idle_exit() and rcu_idle_enter() The rcu_idle_exit() and rcu_idle_enter() functions are exported because they were originally used by RCU_NONIDLE(), which was intended to be usable from modules. However, RCU_NONIDLE() now instead uses rcu_irq_enter_irqson() and rcu_irq_exit_irqson(), which are not exported, and there have been no complaints. This commit therefore removes the exports from rcu_idle_exit() and rcu_idle_enter(). Reported-by: Peter Zijlstra Signed-off-by: Paul E. McKenney diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 0798d2585e87..860d1c147606 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -843,7 +843,6 @@ void rcu_idle_enter(void) RCU_LOCKDEP_WARN(!irqs_disabled(), "rcu_idle_enter() invoked with irqs enabled!!!"); rcu_eqs_enter(false); } -EXPORT_SYMBOL_GPL(rcu_idle_enter); #ifdef CONFIG_NO_HZ_FULL /** @@ -976,7 +975,6 @@ void rcu_idle_exit(void) rcu_eqs_exit(false); local_irq_restore(flags); } -EXPORT_SYMBOL_GPL(rcu_idle_exit); #ifdef CONFIG_NO_HZ_FULL /**