From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755389AbdBQDrS (ORCPT ); Thu, 16 Feb 2017 22:47:18 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37308 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754684AbdBQDrP (ORCPT ); Thu, 16 Feb 2017 22:47:15 -0500 Date: Thu, 16 Feb 2017 19:47:09 -0800 From: "Paul E. McKenney" To: Sergey Senozhatsky Cc: Andrew Morton , Petr Mladek , Steven Rostedt , Peter Zijlstra , Thomas Gleixner , Tony Lindgren , Russell King , linux-kernel@vger.kernel.org, Sergey Senozhatsky , "[3.4+]" Subject: Re: [PATCH] printk: use rcuidle console tracepoint Reply-To: paulmck@linux.vnet.ibm.com References: <20170217015932.11898-1-sergey.senozhatsky@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170217015932.11898-1-sergey.senozhatsky@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17021703-0012-0000-0000-000013AF6F22 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006630; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000203; SDB=6.00823064; UDB=6.00402725; IPR=6.00600510; BA=6.00005146; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014316; XFM=3.00000011; UTC=2017-02-17 03:47:13 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17021703-0013-0000-0000-00004B7F1579 Message-Id: <20170217034709.GR30506@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-17_02:,, 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-1612050000 definitions=main-1702170036 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 17, 2017 at 10:59:32AM +0900, Sergey Senozhatsky wrote: > Use rcuidle console tracepoint because, apparently, it may be issued > from an idle CPU: > > [ 2.581939] hw-breakpoint: Failed to enable monitor mode on CPU 0. > [ 2.591613] hw-breakpoint: CPU 0 failed to disable vector catch > [ 2.597686] > [ 2.597717] =============================== > [ 2.597717] [ ERR: suspicious RCU usage. ] > [ 2.597717] 4.10.0-rc8-next-20170215+ #119 Not tainted > [ 2.597717] ------------------------------- > [ 2.597717] ./include/trace/events/printk.h:32 suspicious rcu_dereference_check() usage! > [ 2.597717] > [ 2.597717] other info that might help us debug this: > [ 2.597717] > [ 2.597717] > [ 2.597717] RCU used illegally from idle CPU! > [ 2.597717] rcu_scheduler_active = 2, debug_locks = 0 > [ 2.597747] RCU used illegally from extended quiescent state! > [ 2.597747] 2 locks held by swapper/0/0: > [ 2.597747] #0: (cpu_pm_notifier_lock){......}, at: [] cpu_pm_exit+0x10/0x54 > [ 2.597747] #1: (console_lock){+.+.+.}, at: [] vprintk_emit+0x264/0x474 > [ 2.597747] > [ 2.597747] stack backtrace: > [ 2.597778] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.10.0-rc8-next-20170215+ #119 > [ 2.597778] Hardware name: Generic OMAP4 (Flattened Device Tree) > [ 2.597778] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [ 2.597778] [] (show_stack) from [] (dump_stack+0xac/0xe0) > [ 2.597778] [] (dump_stack) from [] (console_unlock+0x5e8/0x650) > [ 2.597778] [] (console_unlock) from [] (vprintk_emit+0x270/0x474) > [ 2.597778] [] (vprintk_emit) from [] (vprintk_default+0x20/0x28) > [ 2.597808] [] (vprintk_default) from [] (printk+0x20/0x30) > [ 2.597808] [] (printk) from [] (reset_ctrl_regs+0x108/0x288) > [ 2.597808] [] (reset_ctrl_regs) from [] (dbg_cpu_pm_notify+0x28/0x30) > [ 2.597808] [] (dbg_cpu_pm_notify) from [] (notifier_call_chain+0x44/0x80) > [ 2.597808] [] (notifier_call_chain) from [] (cpu_pm_exit+0x2c/0x54) > [ 2.597808] [] (cpu_pm_exit) from [] (omap_enter_idle_coupled+0x80/0x208) > [ 2.597808] [] (omap_enter_idle_coupled) from [] (cpuidle_enter_state+0x118/0x4ac) > [ 2.597808] [] (cpuidle_enter_state) from [] (cpuidle_enter_state_coupled+0x3a8/0x40c) > [ 2.597839] [] (cpuidle_enter_state_coupled) from [] (do_idle+0x1a4/0x218) > [ 2.597839] [] (do_idle) from [] (cpu_startup_entry+0x18/0x1c) > [ 2.597839] [] (cpu_startup_entry) from [] (start_kernel+0x35c/0x3d4) > [ 2.597839] [] (start_kernel) from [<8000807c>] (0x8000807c) > > This RCU warning, however, is suppressed by lockdep_off() in printk(). > lockdep_off() increments the ->lockdep_recursion counter and thus > disables RCU_LOCKDEP_WARN() and debug_lockdep_rcu_enabled(), which > want lockdep to be enabled "current->lockdep_recursion == 0". > > Signed-off-by: Sergey Senozhatsky > Reported-by: Tony Lindgren > Tested-by: Tony Lindgren > Cc: [3.4+] Acked-by: Paul E. McKenney > --- > kernel/printk/printk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index 7180088cbb23..34da86e73d00 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -1563,7 +1563,7 @@ static void call_console_drivers(const char *ext_text, size_t ext_len, > { > struct console *con; > > - trace_console(text, len); > + trace_console_rcuidle(text, len); > > if (!console_drivers) > return; > -- > 2.11.1 >