From patchwork Wed Jul 20 13:23:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 2786 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 06CAD23F42 for ; Wed, 20 Jul 2011 13:23:24 +0000 (UTC) Received: from mail-qy0-f173.google.com (mail-qy0-f173.google.com [209.85.216.173]) by fiordland.canonical.com (Postfix) with ESMTP id A50EAA1852B for ; Wed, 20 Jul 2011 13:23:23 +0000 (UTC) Received: by qyk10 with SMTP id 10so3267191qyk.11 for ; Wed, 20 Jul 2011 06:23:23 -0700 (PDT) Received: by 10.229.68.200 with SMTP id w8mr7499121qci.114.1311168203138; Wed, 20 Jul 2011 06:23:23 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.217.78 with SMTP id hl14cs113805qcb; Wed, 20 Jul 2011 06:23:21 -0700 (PDT) Received: by 10.68.43.103 with SMTP id v7mr2597694pbl.261.1311168200764; Wed, 20 Jul 2011 06:23:20 -0700 (PDT) Received: from e8.ny.us.ibm.com (e8.ny.us.ibm.com [32.97.182.138]) by mx.google.com with ESMTPS id g8si618464pbc.102.2011.07.20.06.23.19 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Jul 2011 06:23:19 -0700 (PDT) Received-SPF: pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.182.138 as permitted sender) client-ip=32.97.182.138; Authentication-Results: mx.google.com; spf=pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.182.138 as permitted sender) smtp.mail=paulmck@linux.vnet.ibm.com Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by e8.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p6KDAjp9015290 for ; Wed, 20 Jul 2011 09:10:45 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p6KDNIAP135244 for ; Wed, 20 Jul 2011 09:23:18 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p6KDNDb7006480 for ; Wed, 20 Jul 2011 09:23:17 -0400 Received: from paulmck-ThinkPad-W500 (sig-9-76-208-211.mts.ibm.com [9.76.208.211]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p6KDNBik006440; Wed, 20 Jul 2011 09:23:12 -0400 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id 24A3713F803; Wed, 20 Jul 2011 06:23:11 -0700 (PDT) Date: Wed, 20 Jul 2011 06:23:11 -0700 From: "Paul E. McKenney" To: Ed Tomlinson Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, mingo@elte.hu, laijs@cn.fujitsu.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca, josh@joshtriplett.org, niv@us.ibm.com, tglx@linutronix.de, rostedt@goodmis.org, Valdis.Kletnieks@vt.edu, dhowells@redhat.com, eric.dumazet@gmail.com, darren@dvhart.com, patches@linaro.org, greearb@candelatech.com, edward.tomlinson@aero.bombardier.com Subject: Re: [PATCH tip/core/urgent 1/7] rcu: decrease rcu_report_exp_rnp coupling with scheduler Message-ID: <20110720132311.GE2400@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20110720001738.GA16369@linux.vnet.ibm.com> <1311129618.5345.2.camel@twins> <20110720045414.GC2400@linux.vnet.ibm.com> <201107200723.33819.edt@aei.ca> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201107200723.33819.edt@aei.ca> User-Agent: Mutt/1.5.20 (2009-06-14) On Wed, Jul 20, 2011 at 07:23:32AM -0400, Ed Tomlinson wrote: > On Wednesday 20 July 2011 00:54:15 Paul E. McKenney wrote: > > On Wed, Jul 20, 2011 at 04:40:18AM +0200, Peter Zijlstra wrote: > > > On Tue, 2011-07-19 at 17:18 -0700, Paul E. McKenney wrote: [ . . . ] > Paul/Peter, > > With all 7 fixes applied with the above version of patch 1, I get a warning during boot: > > [ 3.443140] EXT4-fs (sdc3): mounted filesystem with ordered data mode. Opts: (null) > [ 3.456097] VFS: Mounted root (ext4 filesystem) readonly on device 8:35. > [ 3.469734] devtmpfs: mounted > [ 3.478488] Freeing unused kernel memory: 628k freed > [ 3.488590] Write protecting the kernel read-only data: 10240k > [ 3.500809] Freeing unused kernel memory: 468k freed > [ 3.514158] Freeing unused kernel memory: 1240k freed > [ 3.552337] ------------[ cut here ]------------ > [ 3.553004] ------------[ cut here ]------------ > [ 3.553004] WARNING: at kernel/rcutree_plugin.h:414 __rcu_read_unlock+0xc9/0x120() > [ 3.553004] Hardware name: System Product Name > [ 3.553004] Modules linked in: > [ 3.553004] Pid: 1, comm: init Not tainted 3.0.0-rcr-crc+ #342 > [ 3.553004] Call Trace: > [ 3.553004] [] warn_slowpath_common+0x7f/0xc0 > [ 3.553004] [] warn_slowpath_null+0x1a/0x20 > [ 3.553004] [] __rcu_read_unlock+0xc9/0x120 > [ 3.553004] [] __atomic_notifier_call_chain+0x91/0xb0 > [ 3.553004] [] ? notifier_call_chain+0x80/0x80 > [ 3.553004] [] ? bit_putcs+0x5b0/0x5b0 > [ 3.553004] [] atomic_notifier_call_chain+0x16/0x20 > [ 3.553004] [] notify_write+0x29/0x30 > [ 3.553004] [] vt_console_print+0x164/0x3b0 > [ 3.553004] [] __call_console_drivers+0x8e/0xb0 > [ 3.553004] [] _call_console_drivers+0x4a/0x80 > [ 3.553004] [] console_unlock+0xfd/0x210 > [ 3.553004] [] vprintk+0x3f6/0x530 > [ 3.553004] [] ? __rcu_read_unlock+0xc9/0x120 > [ 3.553004] [] printk+0x41/0x45 > [ 3.553004] [] ? __rcu_read_unlock+0xc9/0x120 > [ 3.553004] [] warn_slowpath_common+0x3d/0xc0 > [ 3.553004] [] warn_slowpath_null+0x1a/0x20 > [ 3.553004] [] __rcu_read_unlock+0xc9/0x120 > [ 3.553004] [] cpuacct_charge+0xc8/0xe0 > [ 3.553004] [] ? cpuacct_charge+0x48/0xe0 > [ 3.553004] [] ? task_of+0x97/0xd0 The WARN_ON_ONCE() is no longer correct. Here is a patch that goes on top of #4 that fixes it. The bug is in the warning, so if you are running stably with all seven fixes and only get this warning, then that is a -very- good sign! Thanx, Paul ------------------------------------------------------------------------ Fix warning to allow for negative values of ->rcu_read_lock_nesting. Signed-off-by: Paul E. McKenney diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index cb33705..2b5f3e1 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h @@ -411,7 +411,11 @@ void __rcu_read_unlock(void) t->rcu_read_lock_nesting = 0; } #ifdef CONFIG_PROVE_LOCKING - WARN_ON_ONCE(ACCESS_ONCE(t->rcu_read_lock_nesting) < 0); + { + int rrln = ACCESS_ONCE(t->rcu_read_lock_nesting); + + WARN_ON_ONCE(rrln < 0 && rrln < INT_MIN / 2); + } #endif /* #ifdef CONFIG_PROVE_LOCKING */ } EXPORT_SYMBOL_GPL(__rcu_read_unlock);